Skip to content

Instantly share code, notes, and snippets.

@oyeanuj

oyeanuj/Rebase.bash

Last active Oct 18, 2017
Embed
What would you like to do?
Rebasing instructions
# 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
You can’t perform that action at this time.