Skip to content

Instantly share code, notes, and snippets.

@lavaldi
Last active October 27, 2015 16:19
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 lavaldi/5f861937913ec6e3c117 to your computer and use it in GitHub Desktop.
Save lavaldi/5f861937913ec6e3c117 to your computer and use it in GitHub Desktop.
How to make a rebase?

First commit the changes from your local branch

git add .
git commit -m 'fix(about): something'

Switch to the branch with which you will do the rebase

git checkout {other-branch}
git pull origin {other-branch}

Switch to your local branch and performs the rebase

git checkout {local-branch}
git rebase -i origin/{other-branch}

If there are conflicts solved with git mergetool, then git add . and git rebase --continue

Returns to the branch with which you will do the rebase

git checkout {other-branch}
git merge {local-branch}

Finally, push your changes :D

git push origin {other-branch}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment