Files not updating using git pull
Files not updating using git pull
what worked for me is ,
- remove
.git
folder - copy
.git
from other repo - now
git checkout
Before Removing , You can try
git fetch --all
git reset --hard origin/master
You will need to replace master
with the appropriate branch, which now defaults to main
.
What worked for me,
git reset --hard origin/master
It showed me that some file names were too long for git to pull them from my repo and hence the mismatch and incorrect builds.
So I ran following to fix and did a hard reset again.
git config --system core.longpaths true
Thankfully it worked.
Files not updating using git pull
Check your current branch.
git status
git branch
If you are not in a branch, you are in a detached HEAD mode and git pull
wouldnt merge anything.
git log --all --branches
That git log
will help make sure you see if there are any new commits on fetched branches (that is, the remote tracking branches).
I use that git log alias to display those commits as a graph.