[VersionControl]git - You are not currently on a branch. Please specify which branch you want to merge with
Keywords: git, pull, branch
Origin Text:
https://blog.csdn.net/whm18322394724/article/details/86063806
Issue:
When pull first time, there’s error log:
You are not currently on a branch. Please specify which branch you want to merge with.
Solution:
-
check all files, stash or revert all changes
git status
-
switch branch to master
git checkout master
-
update repository
git pull
-
swtich branch to customized branch
git checkout mybranch
上帝等待着人类在智慧中获得新的童年。──泰戈尔(RabindranathTagore)