JBentley
JBentley

Reputation: 6260

git pull returns "Already up-to-date" but branch tracking shows "local out of date"

I have pushed all my branches to origin from machine1. My repo on machine2 is configured to track all branches. On machine2 I ran a git pull but when I commenced working on branch feature I noticed it seemed out of date. Running git remote show origin displays "local out of date" for the feature branch, but re-running git pull displays "Already up-to-date" and git push displays "Everything up-to-date".

What is the cause of this (apparent) conflicting information and what can I do to resolve it? Below is the relevant output from git.

$ git remote show origin
* remote origin
  Fetch URL: github:username/repo
  Push  URL: github:username/repo
  HEAD branch: master
  Remote branches:
    development                 tracked
    feature                     tracked
    master                      tracked
  Local branches configured for 'git pull':
    development                 merges with remote development
    feature                     merges with remote feature
    master                      merges with remote master
  Local refs configured for 'git push':
    development                 pushes to development (up to date)
    feature                     pushes to feature     (local out of date)
    master                      pushes to master      (up to date)

$ git pull
Already up-to-date

$ git push
Everything up-to-date

Upvotes: 1

Views: 162

Answers (1)

Mehdi
Mehdi

Reputation: 7413

git pull only merges remote into the current branch.

git pull --help shows:

Incorporates changes from a remote repository into the current branch.

Read the linked question for further details: Can “git pull --all” update all my local branches?

Upvotes: 2

Related Questions