problems getting uptodate from a remote repository
I have done a 'git fetch' but the repo is not being updated to latest changes.
I am getting the message :-
"Your branch is behind 'origin/master' by 53 commits, and can be
fast-forwarded.
when I do a 'git checkout master'
What is going on here and what can I do about it ?
Here's my config :-
$ git config -l core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true remote.origin.url=git://git.cybercomms.org/llvm/trunk/.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master
Many thanks in advance,
Aaron
Hi Aaron,
Quoted 10 lines · Aaron Gray
I have done a 'git fetch' but the repo is not being updated to latest changes.
I am getting the message :-
"Your branch is behind 'origin/master' by 53 commits, and can be
fast-forwarded.when I do a 'git checkout master'
What is going on here and what can I do about it ?
<snip config>
A fetch just updates your remote tracking branches in your local repository, it doesn't merge them as well. To update your local master you would then do (while on branch master):
$ git merge origin/master
This extra step allows you to create a new branch with origin/master as its start point to check that you're happy with the updates before you update your local master should you wish to do so.
Cheers,
Rob
Heya,
Quoted 1 line · Aaron Gray
I have done a 'git fetch' but the repo is not being updated to latest changes.
Fetch only 'fetches' the data, it doesn't update your working copy. To get your working copy up to date you can do 'git merge origin' after you do 'git fetch origin'. That is such a common operation that there is a single command that does just that, 'git pull origin' will do what you want :).
Signature · 3 lines
Cheers, Sverre Rabbelier