John DeNisco | 06dcd45 | 2018-07-26 12:45:10 -0400 | [diff] [blame^] | 1 | .. _gitreview: |
| 2 | |
| 3 | *************************** |
| 4 | Merging FD.io VPP documents |
| 5 | *************************** |
| 6 | |
| 7 | This section describes how to get FD.io VPP documents reviewed and merged. |
| 8 | |
| 9 | Git Review |
| 10 | ========== |
| 11 | |
| 12 | The VPP documents use the gerrit server and git review. |
| 13 | |
| 14 | Clone with ssh |
| 15 | -------------- |
| 16 | |
| 17 | To get FD.io VPP documents reviewed the VPP repository should be cloned with ssh. |
| 18 | |
| 19 | Use the following to setup you ssh key |
| 20 | |
| 21 | .. code-block:: console |
| 22 | |
| 23 | $ ssh-keygen -t rsa |
| 24 | $ keychain |
| 25 | $ cat ~/.ssh/id_rsa.pub |
| 26 | |
| 27 | Copy that key to the gerrit server. |
| 28 | Then clone the repo with: |
| 29 | |
| 30 | .. code-block:: console |
| 31 | |
| 32 | $ git clone ssh://gerrit.fd.io:29418/vpp |
| 33 | $ cd vpp |
| 34 | |
| 35 | New patch |
| 36 | -------------- |
| 37 | |
| 38 | To get a new patch reviewed use the following: |
| 39 | |
| 40 | .. code-block:: console |
| 41 | |
| 42 | git status |
| 43 | git add <filename> |
| 44 | git commit -s |
| 45 | git review |
| 46 | |
| 47 | If the patch is a draft use the following: |
| 48 | |
| 49 | .. note:: |
| 50 | |
| 51 | git review -D |
| 52 | |
| 53 | |
| 54 | To get back to the master: |
| 55 | |
| 56 | .. code-block:: console |
| 57 | |
| 58 | git reset --hard origin/master |
| 59 | git checkout master |
| 60 | |
| 61 | Existing patch |
| 62 | -------------- |
| 63 | |
| 64 | To modify an existing patch: |
| 65 | |
| 66 | |
| 67 | .. code-block:: console |
| 68 | |
| 69 | git status |
| 70 | git add <filename> |
| 71 | git commit --amend |
| 72 | git review |