Skip to content

Instantly share code, notes, and snippets.

@qdot
Created November 22, 2010 02:25
Show Gist options
  • Save qdot/709435 to your computer and use it in GitHub Desktop.
Save qdot/709435 to your computer and use it in GitHub Desktop.
Prepare:
mkdir foo
cd foo
git init
echo A>A
echo B>B
git add A B
git commit -m AB
git checkout -b br1
echo BB>>B
git commit -a -m BB
git checkout -b br2 master
echo AA>>A
git commit -a -m AA
git branch br2_orig
git checkout master
git rebase --onto master master br1
git checkout master
git rebase br1
git rebase --onto master master br2
git checkout master
git rebase br2
User then continues extending his original br2 (called br2_orig) and makes another pull request:
git checkout br2_orig
echo AAA>>A
git commit -a -m AAA
git checkout master
git rebase --onto master master br2_orig
git checkout master
git rebase br2_orig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment