Disentangle merge conflicts (tried to commit a file that was too big and screwed up)

时间:2016-07-11 21:51:26

标签: git github ssh

It was a pretty simple task: commit a full directory and push it. Unfortunately, I forgot that one of my files exceeded the size limit, so I moved it away. Of course, it remained on my history so I tried to use

"git reset --soft HEAD~1

and a couple of more things but now I have a bigger problem (I DON'T KNOW WHAT I DID (!!)):

Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)

and

Your branch and 'origin/master' have diverged,
and have 1 and 1 different commit each, respectively.

When trying to pull:

CONFLICT (add/add): Merge conflict in Peptide_count/notfound.tsv
Auto-merging Peptide_count/Hs_complex_map.fasta
CONFLICT (add/add): Merge conflict in Peptide_count/Hs_complex_map.fasta
Automatic merge failed; fix conflicts and then commit the result.

I'm desperate.

1 个答案:

答案 0 :(得分:0)

You aren't that far away from clearing this up. Go into the two files that have merge conflicts and clear them up, do a git commit -a, and git push back to your origin. How to resolve merge conflicts? see How to resolve merge conflicts in Git?