Last active
October 18, 2017 17:56
-
-
Save oyeanuj/174d77651024f7ca960740706b5f6f98 to your computer and use it in GitHub Desktop.
Rebasing instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For example I will create a branch off of “next”: | |
git checkout next | |
git checkout -b feature/my-new-feature | |
# Then I have done some work on my new branch, whilst updates | |
# happened to “next”. Before I do a rebase of my feature branch | |
# I do a fetch and check my branches: | |
git fetch | |
git branch -vv | |
# I want to see ifmy feature branch is up to date with the remote | |
# copy of my feature branch (if it had previously been pushed to remote) | |
# When I am happy I that I have all the changes for my feature | |
# branch from the remote I then rebase my branch targetting the | |
# remote verison of the “next” branch I want to rebase against: | |
git rebase origin/next | |
# ...do the whole git rebase --continue melarchy.. | |
# And when all good do a forced push: | |
git push -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment