Git常用命令
2018-04-13detached head,即游离的HEAD,HEAD指向了未知的分支,即不在所有已知的分支范围内。
$ git branch
* (HEAD detached at origin/master)
dev
master
- 如上代码所示,常见解决方案如下:
$ git checkout -b temp
Switched to a new branch 'temp'
$ git branch
dev
master
* temp
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
$ git merge temp
Already up-to-date.
$ git branch -d temp
Deleted branch temp (was 3e74a7a).