I recently had a situation where I merged changes from a feature branch into my master branch and production branch. I then needed to remove the changes from my production branch so I used git revert. I now need to merge those changes back into the production branch, but if I perform a git merge sha1 I receive the message:
Already up-to-date
Can anyone help me with this?
UPDATE
So I wound up creating a branch off of my production branch, applying a diff from the files that I had reverted in that branch and then merging that change into production. I don’t like it, but it worked. I would still be interested in hearing if there is a way to use the same sha1.
git revert, if done on theproductionbranch, would have created a new commit canceling the one you wanted to remove.Since that new commit is already on that branch (‘
production‘), you cannot merge it.If you meant “merge back to
featurebranch”, then the merge you apply that new commit on thefeaturebranch, removing the changes from thefeaturebranch as well.