Keywords: git, pull, branch

Origin Text:

When pull first time, there’s error log:

You are not currently on a branch. Please specify which branch you want to merge with.


  1. check all files, stash or revert all changes

     git status
  2. switch branch to master

     git checkout master
  3. update repository

     git pull
  4. swtich branch to customized branch

     git checkout mybranch