0

I have 2 branch, dev and feature, first I had and at the begining the feature branch was created by dev branch. I did my changes in feature, and after, I did merge with dev. also after I had to do a revert in dev. Now my problem is that when I want to do another merge using feature branch and dev, git said that there are no changes.

I already think about do a revert of revert, butI get different errors becouse there are a lot of commit.

Thanks for your time.

  • 1
    When you revert a commit, it makes a new commit that does the opposite of what the original commit did. The original commit is still in the history so cannot be brought in *again*. If the commit you reverted is a merge commit, the same is true, but for all commits that merge brought in. You need to either revert the revert (maybe we can help you with the errors since you tried that), or rewrite the commits you want to bring in again with cherry-pick or rebase to change their commit IDs. (Also, this is surely a dup if someone wishes to find a good one.) – TTT Jul 11 '22 at 15:30
  • BTW, I'm fairly certain the only way this question might not be a dup is if you show the errors you are getting when attempting to revert the revert. – TTT Jul 11 '22 at 15:33
  • The errors are a conflict or sometimes I get the common error "the commit can not reverted due to 'someFile'" – roberto fernandez Jul 11 '22 at 21:36
  • But why is it not possible to create another branch from dev, put there the changes and do another merge, why git said there are no changes?? – roberto fernandez Jul 11 '22 at 21:37
  • You may want to see if your output is clean with `git status` and also show the exact error message to see why the revert doesn't work. The first two sentences of my first comment answer your last question; it's because your commit ID(s) didn't change. – TTT Jul 11 '22 at 22:26
  • If you can't revert the revert without resolving some merge conflicts, that just means you must resolve these merge conflicts. [There is no Royal Road here.](https://en.wikiquote.org/wiki/Euclid) – torek Jul 11 '22 at 23:17

0 Answers0