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.

  • Proper way to avoid asking for password on every pull on production server
  • How to set up Arcanist workflow with reviewer lag time?
  • How to squash merge multiple commits from branch to master in a single commit using SmartGIT?
  • How to change a local repository name on GitHub for Windows
  • How and/or why is merging in Git better than in SVN?
  • git-pull cannot be used without a working tree
  • Questions.

    1. 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?

    2. If PULL is FETCH/MERGE, why it works differently in this case?

    cOMMANDS USED:

    GIT FETCH "URL"
    GIT MERGE MASTER
    
    For PULL
    
    GIT PULL "URL"
    

  • Whats the Proper usage of .gitattributes with merge=ours
  • Finding the size of a push
  • How to copy a repository completely separate from the original, not a fork?
  • Git List Commits By Blobs
  • Is it possible to host a bare Git repository using Dropbox, to share code?
  • Git - work in new feature while some needed class are on pull request
  • 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 -u or --set-upstream argument with your next git push.

    After your fetch you want to merge the content of your remote tracking branch e.g. origin/master, not your own current branch.

    Git Baby is a git and github fan, let's start git clone.