Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see remote changes to branches in Git?

Tags:

git

There must be something I've overlooked when I learned Git. After all I'm fairly new to it.

My workmate says he's pushed back some changes he made to my commit in our remote repository. However the git log has no record of this new push.

How can I see what he pushed and thus know what branch to pull?

like image 391
why Avatar asked Mar 16 '11 07:03

why


1 Answers

you have to git fetch his changes first. you can then show them using git log origin/branch (branch being very likely master)

git fetch retrieves all the remote changes, copies them to your local clone and updates the remote-tracking branches (those origin/… stuff, see git branch -a). to get his changes into your local branch, use either git pull or git merge

like image 133
knittl Avatar answered Sep 20 '22 12:09

knittl