Skip to content

Instantly share code, notes, and snippets.

@acook
Created May 15, 2014 18:55
Show Gist options
  • Select an option

  • Save acook/11331df68967dc2be7a1 to your computer and use it in GitHub Desktop.

Select an option

Save acook/11331df68967dc2be7a1 to your computer and use it in GitHub Desktop.
# given two users, Bob and Sally, each with their own clone of a github repo and a share branch "foo"
# bob says "hold up don't push to github for a minute"
Bob : git checkout foo ; git pull --rebase ; git rebase master ; git push
Sally : git checkout foo ; git pull --rebase
# and then they go back to work
@acook
Copy link
Copy Markdown
Author

acook commented May 15, 2014

If someone is feeling paranoid they can always git checkout -b backup_branch to keep a pointer to the old branch state before the rebase.

@acook
Copy link
Copy Markdown
Author

acook commented May 15, 2014

However, you can always pull out the commits from the ref log if all else fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment