@@ -109,30 +109,34 @@ $ git push --force-with-lease $USER issue-<number>
109
109
110
110
### Updating Pull Requests
111
111
112
- If your PR fails to pass CI or needs changes based on code review, you'll most
113
- likely want to squash these changes into existing commits.
112
+ If your PR fails to pass CI or needs changes based on code review, it's ok to
113
+ add more commits stating the changes made, e.g. "Address review comments". This
114
+ is to assist the reviewer(s) to easily detect and review the recent changes.
114
115
115
- If your pull request contains a single commit or your changes are related to the
116
- most recent commit, you can simply amend the commit .
116
+ In case of small PRs, it's ok to squash and force-push (see further below)
117
+ directly instead .
117
118
118
119
``` console
120
+ # incorporate review feedback
119
121
$ git add .
120
- $ git commit --amend
121
- $ git push --force-with-lease $USER issue-< number>
122
+
123
+ # create a fixup commit which will be merged into your (original) < commit>
124
+ $ git commit --fixup < commit>
125
+ $ git push $USER issue-< number>
122
126
```
123
127
124
- If you need to squash changes into an earlier commit, you can use:
128
+ Be sure to add a comment to the PR indicating your new changes are ready to
129
+ review, as Github does not generate a notification when you git push.
130
+
131
+ Once the review is complete, squash and push your final commit(s):
125
132
126
133
``` console
127
- $ git add .
128
- $ git commit -- fixup < commit >
134
+ # squash all commits into one
135
+ # --autosquash will automatically detect and merge fixup commits
129
136
$ git rebase -i --autosquash vmware/master
130
137
$ git push --force-with-lease $USER issue-< number>
131
138
```
132
139
133
- Be sure to add a comment to the PR indicating your new changes are ready to
134
- review, as Github does not generate a notification when you git push.
135
-
136
140
### Code Style
137
141
138
142
The coding style suggested by the Go community is used in ` govmomi ` . See the
0 commit comments