简体   繁体   中英

Why I can't use git pull from master branch of github resprority?

Summary:

I have created a repository on GitHub, then I push my code to the repository git push --set-upstream http://XXXXXXXXX master , it works: Here is the master branch:

When I use another laptop pull it into local, git clone http://XXXXXXX it works, but the only main branch, not master branch, I don't know why.

Here is the main branch, actually I pull this branch to local:

Here is what I pull in local, no error:

It seems like you just need to check out the branch you want to be on.

git fetch
git checkout master
git pull

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM