Skip to content

Instantly share code, notes, and snippets.

@vgarro
Created March 2, 2015 18:47
Show Gist options
  • Save vgarro/16a5469cecb25dce0966 to your computer and use it in GitHub Desktop.
Save vgarro/16a5469cecb25dce0966 to your computer and use it in GitHub Desktop.
git checkout master
git pull
git checkout -b <my_branch> origin/master # This will make the rebase automatically when you do git pull
# do my job
git commit -m 'my work1'
git commit -m 'my work2'
git commit -m 'my work3'
git pull # At this point, remote changes gets added before 'my work1' if any
git push origin <my_branch> # branch is updated using remote and new changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment