...
At first blush, the syntax of this second command is a little strange. It is actually a form of the "git push <remote> <localBranch>:<remoteBranch>" command. If you do not specify the local branch, this basically means push nothing onto the remote branch, and Git removes the remote branch.
Configure for Performing Code Reviews
Since pull-requests are used when offering patches for code review, if you are performing a code review, this is one way that you can configuration Git to simply the process.
At the top-level of the pertinent project directory, change your ".git/config" file as follows (notice addition of line:5)
Code Block title Example from the "fcrepo4" project linenumbers true ... [remote "origin"] url = https://github.com/fcrepo4/fcrepo4.git fetch = +refs/heads/*:refs/remotes/origin/* fetch = +refs/pull/*/head:refs/remotes/origin/pull/* ...
Refresh your local cache
No Format git checkout master git pull
Checkout the pull-request branch for review
Code Block git checkout --track origin pull/xxx
- Enjoy the review