1

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
JBentley
  • 6,099
  • 5
  • 37
  • 72
  • What happens whenever you run `git checkout feature; git merge origin/feature`? – Mehdi Feb 22 '20 at 16:30
  • Does this answer your question? [Can "git pull --all" update all my local branches?](https://stackoverflow.com/questions/4318161/can-git-pull-all-update-all-my-local-branches) – Mehdi Feb 22 '20 at 16:34
  • @Mehdi Thanks, [your answer](https://stackoverflow.com/a/60354284/1227469) seems rather obvious now, but I will not delete the question as you put in the effort to answer it. Thanks. – JBentley Feb 22 '20 at 16:37

1 Answers1

2

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?

Mehdi
  • 7,204
  • 1
  • 32
  • 44