Explore Courses Blog Tutorials Interview Questions
+1 vote
in DevOps and Agile by (19.7k points)
I am using Git to cooperate with other users, but today I cannot get the latest change on some files using "git pull", and I cannot see the changes in "git log".

What could be the issue?

1 Answer

+1 vote
by (62.9k points)

The following order of commands helped me:

  • remove .git folder
  • copy .git from other repo
  • now git checkout

Before Removing, You can try

git fetch --all 

git reset --hard origin/master

The result showed me that some file names were too long for git to pull them from my remote repository and hence the mismatch and incorrect builds occurred.

So I ran the following command in order to fix it and did a hard reset again.

git config --system core.longpaths true

Browse Categories