First off: I'm a relative newbie to git
but am very familiar with svn
(but that doesn't count anymore):
I was told that changes were committed to master (at 83bb0af238f2d845a633a920ee647395234033a6
) and I should update my forked copy. I have set a remote
"upstream" to master and executed a git fetch upstream master
in my working copy. I then got the following:
...
Unpacking objects: 100% (6/6), done.
From http://xxx.xxx.xxx.xxx:pppp/path/to/repo
* branch master -> FETCH_HEAD
fa3e0c9..83bb0af master -> upstream/master
and I was wondering how I can verify that the changes actually were pulled-in and that my copy now is up-to-date?
I pulled the changes into my local master copy and did git log
to see the changes. Now the problem is, I'd expect the same comment to show up in my forked local copy too (on git log
) but it doesn't... what went wrong I'm wondering and how can I fix it?
git stash
git pull --rebase
git stash pop
this will stash any local change, then pull the changes from remote and finally pops your stashed contents, if any.
To get the changes from your upstream
git checkout master
git fetch upstream master
git merge upstream/master
git log
git push origin
Now, your upstream changes are pulled, merged and pushed to your fork (origin).