Git 出現Branch master set up to track remote branch master問題 與忽略檔案上傳

來源:互聯網
上載者:User

標籤:status   表示   方法   參考   解決   分支   過濾   檔案   details   

錯誤:在push 到遠程倉庫是一直提示下列錯誤,檢查了使用status檢查了也沒有發現錯誤,最後排查出來是當前分支為((no branch))即右上那個id (┬_┬)。。。。。

 

 

 

原因:出現這個問題的根本原因在於推送的分支沒有做commit操作,直接原因是,在idea整合是錯誤的建立了一個分支*(no branch) 並一直在該分支下執行push master指令。解決方案:合并分支到master 並檢查status,切換分支:git checkout master、檢查衝突(一般是沒有的)、合并分支參考:http://blog.csdn.net/guoguo295/article/details/8205875

附加上傳時忽略檔案上傳

方法:建立檔案.gitignore,並編輯

##注釋##:注釋

/檔案夾/ :過濾檔案夾

*.xml :過濾某類型的檔案

/mtk/do.c:指定過濾具體檔案

!開頭表示不過濾

 *.[oa]    支援萬用字元:過濾repo中所有以.o或者.a為副檔名的檔案

 

 參考:http://blog.csdn.net/u014079773/article/details/51602344

 http://blog.csdn.net/xmyzlz/article/details/8592302

Git 出現Branch master set up to track remote branch master問題 與忽略檔案上傳

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.