2

When I downloaded changes from a remote to my local GIT repository via

git fetch

the status of my local repository was reported as

Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded

which was quite obvious. Local changes or changes in the index were not listed. However, when I tried to do a fast forward by calling

git merge origin/master

I received the error message "Your local changes to the following files would be overwritten" and one file was listed, which I indeed changed before. The strange thing is that it does not appear in the status report and so I cannot merge it with the remote version. Neither I can revert the changes since they are obviously not recognized.

In fact I, wonder how it is possible that no local changes are listed, but the merge fails due to local changes. The solution provided for a similar issue did not help me, either.

Could anybody give me a hint on what could be the reason for that? Thanks in advance.

4

1 に答える 1

1

git fetch最初に またはgit pullを試してくださいgit rebase。その後、マージを行うことができるはずです

于 2012-11-28T10:17:22.167 に答える