Reputation: 185
I'm pretty new to git so I'm still getting my bearings with the tool.
I have a "small" problem involving a merge. Basically the timeline is as follows:
Now I realize that a bunch of changes have gone missing in the last merge and I'm wondering how best to undo the merge and get git to allow me to push my changes to origin?
I hope I've made the issue clear...if not beat me over the head
Upvotes: 1
Views: 473
Reputation: 571
Using the git reflog command previously mentioned find your "lost" commits. You can use git show to review each commit. I would then suggest cherry picking those commits into your current branch with the completed merge one at a time. Obviously you should test as you go (you do have unit tests don't you? :-). Once you have picked all the commits you are free to push your changes.
Upvotes: 0
Reputation: 5449
I'm not clear on exactly how to fix it, but git reflog
is quite a powerful tool. It will show you everything that's happened to the repo. Then, for example, you can cherry-pick commits from history even if they're not in the working master branch.
Upvotes: 2