Skip to content

Instantly share code, notes, and snippets.

@martinus
Last active December 28, 2017 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinus/f9f5e34b54c9dee3e721167fbcdc0c14 to your computer and use it in GitHub Desktop.
Save martinus/f9f5e34b54c9dee3e721167fbcdc0c14 to your computer and use it in GitHub Desktop.

Read https://help.github.com/categories/collaborating-with-issues-and-pull-requests/

How to rebase

from https://www.digitalocean.com/community/tutorials/how-to-rebase-and-update-a-pull-request

  1. git clone https://github.com/martinus/bitcoin.git
  2. git remote add upstream https://github.com/bitcoin/bitcoin.git
  3. git fetch upstream
  4. git remote -v
  5. git checkout improved-benchmarking
  6. find merge base
    1. git merge-base improved-benchmarking upstream/master
    2. git rebase -i 2c66cea2d18682de1eef544fc3b74a1487a1741c
  7. git push -f # (force push to GitHub)

How to rebase, once the remote is already there

  1. git fetch upstream
  2. git merge-base improved-benchmarking upstream/master
  3. git rebase -i hash-of-above-command
  4. git push -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment