I work in develop branch. Sometimes, when I want to push changes to origin, git say, that there are some changes in origin/master branch.
How to pull changes from remote master to local master without checkout to local master?
I work in develop branch. Sometimes, when I want to push changes to origin, git say, that there are some changes in origin/master branch.
How to pull changes from remote master to local master without checkout to local master?
If you want to update your local master without checkout, you can do :
git pull origin master:master
That will update your local master with the origin/master
Or, as I assume that you want to ultimately rebase your develop branch with the changes occured in origin/master, you can do a simple git fetch, that will not touch your local branches :
git fetch
Now your origin/masteris up to date, so you can rebase or merge your local branch with these changes. For example, when you are in your develop branch :
git rebase origin/master
And your develop branch will be up to date with the changes.
 
    
    Accepted answer will also pulls master into your actual branch.
git fetch
git branch -D master
git checkout --track origin/master
