Already uptodate in git – GIT PULL works but not GIT FETCH
I have some committed changes in local repository. Now I FETCH the remote repository and MERGE it..It says “Already Uptodate” but its not. I checked the logs and file and its not uptodate.
When I do a PULL it automatically merges the latest changes correctly without any problem and creates a new commit. Also, was able to push the changes successfully.
Why there is a problem only with my FETCH/MERGE. Why it does not pull the changes..How do I pull the latest changes and commit it and push it, so no commits are lost?
If PULL is FETCH/MERGE, why it works differently in this case?
GIT FETCH "URL" GIT MERGE MASTER For PULL GIT PULL "URL"
2 Solutions collect form web for “Already uptodate in git – GIT PULL works but not GIT FETCH”
When you run
git pull without specifying the branch it pulls the branches it is tracking.
To check which branches you are tracking for a given remote check by running something like this which will produce something like this :
$ git remote show origin … Local branches configured for 'git pull': develop merges with remote develop master merges with remote master
In order to set this up I believe all you have to do is add the
--set-upstream argument with your next
fetch you want to merge the content of your remote tracking branch e.g.
origin/master, not your own current branch.