Skip to content

Instantly share code, notes, and snippets.

@getdave
Forked from aduth/gitrebasebranch.sh
Created March 22, 2021 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save getdave/39804a538c8352c642fb6df2832858b3 to your computer and use it in GitHub Desktop.
Save getdave/39804a538c8352c642fb6df2832858b3 to your computer and use it in GitHub Desktop.
Git - Interactive rebase against own merge base
#!/bin/bash
git rebase -i $(git merge-base HEAD master)
@getdave
Copy link
Author

getdave commented Mar 22, 2021

If root branch is trunk then adjust to

#!/bin/bash
git rebase -i $(git merge-base HEAD trunk)

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