在git首次提交時出錯以及解決方式
阿新 • • 發佈:2018-12-23
[[email protected] git]# git push
[email protected]'s password:
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
error: failed to push some refs to '[email protected]:/home/git/'
[[email protected] git]# git push origin master
[email protected]'s password:
Counting objects: 1179, done.
Compressing objects: 100% (1152/1152), done.
Writing objects: 100% (1179/1179), 79.82 MiB | 2.59 MiB/s, done.
Total 1179 (delta 524), reused 0 (delta 0)
To [email protected]:/home/git/
* [new branch] master -> master
[ [email protected] git]#
最近新建了一個專案,在首次git push的時候出錯了,對於首次推送,我們只需要使用"git push origin master"就可以了,如上面的程式碼所示。