当我尝试执行 git pull 时,我从 git 收到此错误消息:
$ git branch
develop
feature/add-extra-student-automatically-to-cround
* feature/adjust-my-settings-as-pm
feature/change_order_course_code_name
feature/link_my_settings_to_create_survey
feature/moodle-turnitin-message
feature/remove_wrong_text_in_notifications
feature/survey-reports_show-coursename-better-in-survey
feature/yellow-box-course-schedule
master
dac@dac-Latitude-E7450:/etc/proj/social$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> feature/adjust-my-settings-as-pm
如何解决该错误?
最佳答案
你可以:
git pull origin <your_branch>
为了防止这种情况,请使用 -u
当您按下以便:
Set up
<branchname>'s
tracking information so<upstream>
is considered<branchname>'s
upstream branch. If no<branchname>
is specified, then it defaults to the current branch.
它只会告诉 git
当它尝试 pull 该分支时要查看哪里。
关于git - 无法对分支使用 git pull,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31854922/