Skip to content

Instantly share code, notes, and snippets.

@anaumov
Created August 26, 2020 10:00
Show Gist options
  • Save anaumov/73d615dc43d7b3eef298df8355552134 to your computer and use it in GitHub Desktop.
Save anaumov/73d615dc43d7b3eef298df8355552134 to your computer and use it in GitHub Desktop.
Rebase all commits in branch to separate branch after merge to master
git rebase --onto live $(git merge-base --fork-point master) $(git branch --show-current)
@anaumov
Copy link
Author

anaumov commented Aug 26, 2020

  1. Create a branch from master
  2. Make some changes, commit them.
  3. Merge branch to the master
    Now you need to apply these commits to live branch. Go ahead and run this script!

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