0

I have an issue where I am now trying to merge a branch which isnt including all of the updated files.

In the past I merged this branch (lets call it branch2) into master and pushed the changes to the remote repository, I then realised there was a bunch of issues that branch2 caused so I had to unmerge the branch from master.

I have now fixed the issues in branch2 which caused the problems when I last merged them. When I now try and merge branch2 into master it is only including the files I updated since reverting the merge.

I need it to include all the previous files that this branch had as well as the files I updated in order to make the branch work.

I have done many commits onto the master branch since I reverted the previous merge as well.

I have read since git knows these files were deleted it will no longer include them when I try and merge again, is there a way to get around this?

Luke Rayner
  • 391
  • 6
  • 20
  • Consider reverting the revert, which is the standard answer to this problem. – torek Dec 09 '20 at 21:13
  • @torek Sorry to be cheeky but is there an example you could give because I'm worried im going to mess everything up – Luke Rayner Dec 09 '20 at 21:14
  • Does this answer your question? [How do I "un-revert" a reverted Git commit?](https://stackoverflow.com/questions/8728093/how-do-i-un-revert-a-reverted-git-commit) Or perhaps [this one](https://stackoverflow.com/questions/1078146/re-doing-a-reverted-merge-in-git) or [this one](https://stackoverflow.com/questions/1078146/re-doing-a-reverted-merge-in-git) or [this one](https://stackoverflow.com/questions/43221775/git-revert-a-revert-for-a-merge) or [this one](https://stackoverflow.com/questions/3199366/git-cancel-a-revert). – IMSoP Dec 09 '20 at 21:17
  • @IMSoP would this work if I duplicated my master branch and then tried so I dont break master? Then when I am happy I'll do it on master – Luke Rayner Dec 09 '20 at 21:18
  • 1
    Yes, you can make another branch name and try things out there. (Sorry about the delay, AFK a lot lately) – torek Dec 09 '20 at 22:32

0 Answers0