Git:No refs in common and none specified解决方法
from http://goodnight0003.sinaapp.com/?p=466
症状:
#git branch
没有任何分支
#git push时出现如下错误:
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
解决方法:
git push origin master:master
原因:
一般是因为clone了一个纯仓库,也就是说仓库是通过git init –bare方式建立的,由于是纯仓库,没有任何分支,也没有master分支,客户端checkout出来后也没有master,因而首次提交代码时需要手动指定远程仓库路径
全站熱搜