Reputation: 519
I checkout to develop
branch, and run git pull
, I got error of fatal: 'develop' does not appear to be a git repository
. Instead, I have to do git pull origin develop
. Why is that so? Something is wrong with my git setup?
Upvotes: 0
Views: 2182
Reputation: 1329672
Whether or not you have configured the default remote branch, the syntax of git pull
is:
false in your question: git pull [<options>] [<repository> [<refspec>…]]
That would be
git pull origin develop
NOT: git pull develop
The first argument is the name of the remote repository, and, as the error message indicated, "develop
" is not a remote repository. origin
is.
That last command would have establish a link between the local branch develop and the remote tracking branch origin/develop.
In your case, since you want to pull and not push:
git fetch
git checkout --track origin/dev
If the local branch develop
already exists, see "Make an existing Git branch track a remote branch?":
git branch -u origin/develop develop
git checkout develop
git pull
Upvotes: 1
Reputation: 34677
You've not configured a default remote for the branch. Do so using git pull origin -u develop
.
Upvotes: 1