Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

  1. At the top-level of the pertinent project directory, change your ".git/config" file as follows (notice addition of line:5)

    Code Block
    titleExample from the "fcrepo4" project
    linenumberstrue
    ...
    [remote "origin"]
            url = https://github.com/fcrepo4/fcrepo4.git
            fetch = +refs/heads/*:refs/remotes/origin/*
            fetch = +refs/pull/*/head:refs/remotes/origin/pull/*
    ...
  2. Refresh your local cache

    No Format
    git checkout master
    git pull
  3. Checkout the pull-request branch for review

    Code Block
    git checkout --track origin pull/xxx
  4. Enjoy the review