Skip to content

Instantly share code, notes, and snippets.

@maff
Last active April 1, 2021 07:33
Show Gist options
  • Select an option

  • Save maff/c74de301d2c4b9f61e6d3f91f150dc83 to your computer and use it in GitHub Desktop.

Select an option

Save maff/c74de301d2c4b9f61e6d3f91f150dc83 to your computer and use it in GitHub Desktop.
Git Cheatsheet

rebase --onto

  • we have a master
  • we have a feature branch feat-xyz
  • we do a bugfix on branch bug-abc but branched from feat-xyz instead of master and want to rebase our bugfix branch to contain only commits from master + our bugfix branch
$ (bug-abc) git rebase --onto master feat-xyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment