Skip to content

Instantly share code, notes, and snippets.

@develohpanda
Last active May 2, 2020 04:14
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 develohpanda/d78d7804cd926c1674f64329b38ddc50 to your computer and use it in GitHub Desktop.
Save develohpanda/d78d7804cd926c1674f64329b38ddc50 to your computer and use it in GitHub Desktop.
Rebase snippet

Dependent on PR #

The base for this-branch is not develop and we need to rebase onto develop once old-parent-branch (in the PR above) has been merged. This way history is kept clean and consistent. After re-basing, update the base branch for this PR to be develop and delete this snippet.

git checkout develop
git pull
git rebase --onto develop <old-parent-branch> <this-branch>
git push --force

Make sure you are aware of the ramifications of using git push --force

More info on git rebase --onto

image Extracted from Atlassian docs


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