Stophface Stophface - 2 months ago 11
Git Question

How to pull local master into local branch

I have a remote

origin/master
and a remote branch
remote_branch
.
I also have local
master
and a local branch
local_branch
. When I try to pull the local
master
into the
local_branch
with
git pull master local_branch
I get this.

fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.


However, when I do
git branch
I see this:

* loca_branch
master


Why can't I pull from my local
master
?

Answer

pull changes from local_branch TO master

git checkout master
git merge local_branch

pull changes from master TO local_branch

git checkout local_branch
git merge master

Pull is when you have an 'origin' repo :)