Git merge issue(s)

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:

  • Generating online books
  • Share unfinished work (uncommited and new files) via Git
  • how to add option ' git merge --no-ff ' in TortoiseGit
  • SQL Server Database to share with team?
  • How do I acquire a “cleansed” Git repository?
  • How to trigger one TeamCity build for multiple commits but one merge into a branch
    1. Did a rebase from SVN using git-svn bridge
    2. Had conflicts which I merged, but never committed
    3. Did other work…lots of it and committed a number of other changes
    4. Tried to push and got “fatal: you have not concluded your merge MERGE_HEAD exists”
    5. I did a “git reset –merge ORIG_HEAD” as recommended at
    6. Fixed merge issues
    7. Foolishly committed changes and pushed

    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

  • git tag: fatal: Failed to resolve 'HEAD' as a valid ref
  • git repository failed to traverse parent error
  • Repository not found error, right after `git remote add`
  • Safe master-master setup with git? (writable git mirror)
  • git-flow: how to checkout release branch from origin?
  • How can I see the list of all commits that affect a specific file with git (including orphaned or dangling commits)
  • 2 Solutions collect form web for “Git merge issue(s)”

    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.

    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.

    Git Baby is a git and github fan, let's start git clone.