vishal kumar
vishal kumar

Reputation: 41

getting latest changes and updates from git server

I had created my own Branch named as vishal_branch from master branch. I had done some changes before and committed. After me many other's also did changes and committed. This will update the server with new changes. Now again I am working in my local Branch (vishal_branch).

How can I get the lasted updates of server in my branch.

Upvotes: 0

Views: 2240

Answers (2)

Jon A.
Jon A.

Reputation: 39

You have to fetch the state of origin, and merge origin/master updates into your local branch:

git fetch origin 
git checkout master
git merge origin/master

To switch to your branch, just do

git checkout vishal_branch

Upvotes: 3

mpnap
mpnap

Reputation: 163

You have to do pull from source. That will bring you local branch up to the same level as the source branch. If you changed same files, merge might be necessary.

http://git-scm.com/docs/git-pull

Upvotes: 1

Related Questions