0

I cloned a repository from Gitlab and then did git pull origin master, then switched to anther branch branchA. I later did git pull origin branchA, this causes a few files in my local became unstaged, however I didn't make any of these changes, they're all the files committed by others, and if I pull it again, git prompt me to "merge branchA into BranchA", why is that?

Sawyer
  • 15,581
  • 27
  • 88
  • 124
  • Maybe some other program is auto-updating your files? Using Sublime, LESS/SASS compiler or other program that may work in background? – Justinas Jun 03 '15 at 09:54
  • @Justinas no, not in this case. – Sawyer Jun 03 '15 at 09:56
  • 1
    Maybe my answer here could help you: http://stackoverflow.com/questions/25871938/unstaged-changes-immediately-after-cloning-in-eclipse/30118841#30118841 – ckruczek Jun 03 '15 at 10:28
  • Have you pushed the newly created branch to origin? Have you set an upstream to the new branch? – iosifv Jun 03 '15 at 11:35
  • @VighIosif i didnt create a new branch. just switched to an existing branch. – Sawyer Jun 03 '15 at 11:43
  • @ckruczek its not a line ending issue, all the devs are using OS X, and these files are not just like modified, some of them are untracked, like added by myself, but i didnt do anything, still in that branch. – Sawyer Jun 03 '15 at 11:48
  • Sounds like a merge conflict - did you get a message about a conflict when you did `git pull`? – David Deutsch Jun 06 '15 at 16:24

1 Answers1

0

I think you made pull from working copy, so files has been modified meanwhile.

Vipul
  • 96
  • 6
  • the last commit in branchA is two hours ago, the files all become uncommited in my local, some are even untracked, which means it's impossible that i modified it. – Sawyer Jun 03 '15 at 09:59