Here's my problem. I have a branch off master, and i made some changes. A little later my partner reverted a change they had made because it was breaking something. When i ran git fetch; git rebase master
master was fixed and everything was okay. But when I ran git fetch; git rebase my_feature
the my_feature
branch still had the same problems as before. How can i update the my_feature
branch so that it takes into account the reverted commit? Thanks!
You first need to git fetch and git merge your master branch that is following the remote master branch. You can do this with git checkout master
then git pull origin master
. This will bring your master branch up to a place that is equilivant with the remote repository.
Then you will need to do the following to rebase your feature branch ontop of the new commits (a git revert is just another commit to a branch and should be treated the same as any other commit (with special concerns depending on the situation)):
git checkout my_feature
then git rebase master
.
This will rebase your feature branch ontop of the new local master branch which should be tracking the remote master branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With