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?
Using git pullUse git pull to update a local repository from the corresponding remote repository. Ex: While working locally on master , execute git pull to update the local copy of master and update the other remote tracking branches.
merge changes from local_branch TO master
git checkout master
git merge local_branch
merge changes from master TO local_branch
git checkout local_branch
git merge master
Pull is when you have an 'origin' repo :)
git pull is an alias for git fetch && git merge you cannot fetch from local branches (only from remotes) - actually you don't need to, if your intention is to merge master into local_branch, just use git merge master when you are on local_branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With