今天 GIT 上遇到个神乎其神的问题【git detached HEAD 】
上次解决git 冲突 一小时+,莫名其妙的,稀里糊涂的解决,应该是:
git reset --hard commitID
git push -f
不是很费劲的好了。(新写的代码重新复制了一遍。)
**这次的问题比较刁钻如图:pull 总是失败,也没法 push **


解决办法 git checkout -b 【new】
git -am commit "comment"
git push origin 【new】
git check out master
git merge 【new】
删除本地分支:git branch -d 【branchA】
删除远程分支:git push origin --delete 【branchA】
网友评论