git 提交到遠程庫基本命令

…or create a new repository on the command line
echo "# autofun" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/jd2017/autofun.git git push -u origin master
…or push an existing repository from the command line
git remote add origin https://github.com/jd2017/autofun.git git push -u origin master
…or import code from another repository
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.
git 常用命令:
建分支:git branch test
切換分支:git checkout test
查看分支:git branch
刪除分支: git branch -d test

error: src refspec master does not match any.
引起該錯誤的原因是,git提交空目錄上去造成的,添加文件后提交解決;

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • 本文作者陳云峰,轉載請注明。 這篇文章記錄個人常用的一些命令,和記不住的一些命令,轉載了并不斷更新。 Git官網 ...
    陳云峰閱讀 2,837評論 0 24
  • 1.登錄iOS 開發者中心 點擊賬戶2.png3.第一個是添加團隊成員 第二個是 發布&調試 證書 &描述文件 ...
    NieFeng1024閱讀 852評論 0 1
  • 今天是連續寫作的第35天,不禁有點暗暗佩服自己。個人歷史上從來沒有過連續堅持這么多天的寫作,雖然寫作的文稿還很粗糙...
    明月清風舟閱讀 383評論 0 2
  • 我們知道,基本上每個 APP 都會有啟動引導圖,就是啟動 APP 時能夠左右滑動的大圖,滑動到最后一頁時,再左滑或...
    Vivi成長吧閱讀 5,230評論 0 5
  • 今天又是星期一,下午看見老師在群里發的作業,還是讓他們認識二級生字,標拼音,晚上回來把生字又標了一遍拼音,...
    耿浩然媽媽閱讀 192評論 0 5