Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = git-receive-pack |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == NAME |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 4 | git-receive-pack - Receive what is pushed into the repository. |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 5 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 6 | == SYNOPSIS |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 7 | [verse] |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 8 | -- |
Michael Ochmann | e2d76a1 | 2016-06-23 17:07:37 +0200 | [diff] [blame] | 9 | _git receive-pack_ |
Edwin Kempin | 73b2698 | 2012-07-16 13:53:22 +0200 | [diff] [blame] | 10 | [--reviewer <address> | --re <address>] |
| 11 | [--cc <address>] |
| 12 | <project> |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 13 | -- |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 14 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 15 | == DESCRIPTION |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 16 | Invoked by 'git push' and updates the project's repository with |
| 17 | the information fed from the 'git push' end. |
| 18 | |
| 19 | End users can supply options to this command by passing them through |
| 20 | to 'git push', which will relay them automatically. |
| 21 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 22 | == OPTIONS |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 23 | |
| 24 | <project>:: |
| 25 | The remote repository that will receive the pushed objects, |
| 26 | and create (or update) changes. Within Gerrit Code Review |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 27 | this is the name of a project. The optional leading `/` |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 28 | and or trailing `.git` suffix will be removed, if supplied. |
| 29 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 30 | --reviewer <address>:: |
| 31 | --re <address>:: |
Shawn Pearce | 69928a6 | 2013-02-24 18:01:27 -0800 | [diff] [blame] | 32 | Automatically add <address> as a reviewer to any change. |
| 33 | Deprecated, use `refs/for/branch%r=address` instead. |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 34 | |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 35 | --cc <address>:: |
Shawn Pearce | 69928a6 | 2013-02-24 18:01:27 -0800 | [diff] [blame] | 36 | Carbon-copy <address> on the created or updated changes. |
| 37 | Deprecated, use `refs/for/branch%cc=address` instead. |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 38 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 39 | == ACCESS |
Gert van Dijk | dc4f8d1 | 2017-08-27 21:14:23 +0200 | [diff] [blame] | 40 | Any user who has SSH access to Gerrit. |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 41 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 42 | == EXAMPLES |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 43 | |
| 44 | Send a review for a change on the master branch to charlie@example.com: |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 45 | ---- |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 46 | git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 47 | ---- |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 48 | |
Shawn O. Pearce | d50c94e | 2010-07-15 12:24:11 -0700 | [diff] [blame] | 49 | Send reviews, but tagging them with the topic name 'bug42': |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 50 | ---- |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 51 | git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com,topic=bug42 |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 52 | ---- |
Shawn O. Pearce | d50c94e | 2010-07-15 12:24:11 -0700 | [diff] [blame] | 53 | |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 54 | Also CC two other parties: |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 55 | ---- |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 56 | git push ssh://review.example.com:29418/project HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 57 | ---- |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 58 | |
| 59 | Configure a push macro to perform the last action: |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 60 | ---- |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 61 | git config remote.charlie.url ssh://review.example.com:29418/project |
| 62 | git config remote.charlie.push HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 63 | ---- |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 64 | |
| 65 | afterwards `.git/config` contains the following: |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 66 | ---- |
| 67 | [remote "charlie"] |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 68 | url = ssh://review.example.com:29418/project |
| 69 | push = HEAD:refs/for/master%r=charlie@example.com,cc=alice@example.com,cc=bob@example.com |
Shawn O. Pearce | 4776924 | 2011-06-14 16:40:48 -0700 | [diff] [blame] | 70 | ---- |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 71 | |
| 72 | and now sending a new change for review to charlie, CC'ing both |
| 73 | alice and bob is much easier: |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 74 | ---- |
David Shevitz | c47f236 | 2018-09-27 10:55:35 -0700 | [diff] [blame] | 75 | git push charlie |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 76 | ---- |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 77 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 78 | == SEE ALSO |
Shawn O. Pearce | 93599bb | 2009-06-16 07:27:53 -0700 | [diff] [blame] | 79 | |
| 80 | * link:user-upload.html[Uploading Changes] |
| 81 | |
| 82 | GERRIT |
| 83 | ------ |
| 84 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 85 | |
| 86 | SEARCHBOX |
| 87 | --------- |