Skip to content

Instantly share code, notes, and snippets.

@eyalgo
Created July 8, 2015 09:59
Show Gist options
  • Save eyalgo/9015dd21ea9ee3e263bd to your computer and use it in GitHub Desktop.
Save eyalgo/9015dd21ea9ee3e263bd to your computer and use it in GitHub Desktop.
Pushing to pull request branch git commands
# Update the branches
git fetch
# Rebase from master to the branch to be update
git rebase -i origin/master
# Show commits tree in gitk
gitk --all
# Push to the upstream branch
# Make sure the push default is setup correctly (simple / upstram)
git push -f
# Rebase (again) from master to the branch to be update
# At this point, we can change history
git rebase -i origin/master
# Fetch again
git fetch
# Update local code and final push
git rebase origin/master
git push -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment