git version 1.7.3.5
I have the following branches:
git branch
image
master
* video
I did some work at the office. And when I came home I always update on my home’s notebook.
However, when I did a git remote show origin I get the following:
Local refs configured for 'git push':
image pushes to image (up to date)
master pushes to master (fast-forwardable)
video pushes to video (local out of date)
So I did a git pull for all of these branches:
git pull origin image
git pull origin master
git pull origin video
When I do a git status on the video and image branch I get:
nothing to commit (working directory clean)
When I do a git status on the master branch I get:
Your branch is ahead of 'origin/master' by 5 commits.
Which I don’t understand the following (fast-forwardable) and (local out of date)?
But in the git status for video it saids its up to date?
Do I need to push my master if it is ahead by 5 commits?
Many thanks for any suggestions
git remote show origincompares your local repository with the remote:fast-forwardablemeans you can push your local changes to the remote branch.local out of datemeans your local branch is behind the remote branch and you should pull from it.git statuscompares your local working directory with the current commit of the current branch (akaHEAD). Additionally it compares your local branch with the (local!) tracking copy of the remote branch (origin/master), hence theYour branch is ahead of 'origin/master' by 5 commits.To solve the divergence between
git status(which shows only local data) andgit remote show origin(which shows “live” remote data) you should rungit remote update originwhich will update your local tracking branches. It will update your localorigin/masterto the state of the remote’smaster. After thatgit statusshould give you something likeYour branch is behind 'origin/master' by X commits, and can be fast-forwarded.