Rob
Rob

Reputation: 11368

Strange Git fail on pull

I just did a pull in my local Git repo and it seems to have failed as it was just hanging there. I did an abort, tried to repull but it hangs again.

I previously had no changed files and everything was pushed up to the main repo, however when I go to commit, I can see the changes that were just pulled as for me to commit?

I did a: git reset --hard, which seems to have reset things okay, but the files are still there as left to be committed?

How do I resolve this?

Upvotes: 2

Views: 1475

Answers (2)

Narbs
Narbs

Reputation: 31

If there are files left over to be committed as a result of the merge and you want to remove them, do a:

git reset HEAD path_to_file_or_folder

This will unstage your changes staged for commit.

You can then do a:

git checkout -- path_to_file_or_folder

This will discard the changes in your working folder

Upvotes: 0

Bijendra
Bijendra

Reputation: 10015

When you pull the code, the auto merge happens and if their are no conflicts the merge is successful. In your case it looks like the merge happened with some conflicts, check all the files which show up in the git status which have come from git pull. Also start looking into .git/config for references for that branch.

Upvotes: 1

Related Questions