日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

使用GitGUI创建上传本地工程

發布時間:2023/12/31 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用GitGUI创建上传本地工程 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

參考鏈接:

??????? 使用Git-GUI創建工程

??????? http://jingyan.baidu.com/article/27fa732683ebf546f8271f2e.html


一、剛創建的github版本庫,在push代碼時出錯:

$ git push -u origin master To git@https://github.com/wishchin/SlamWishG2O.git! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@https://github.com/wishchin/SlamWishG2O.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
網上搜索了下,是因為遠程repository和我本地的repository沖突導致的,而我在創建版本庫后,在github的版本庫頁面點擊了創建README.md文件的按鈕創建了說明文檔,但是卻沒有pull到本地。這樣就產生了版本沖突的問題。

有如下幾種解決方法:

1.使用強制push的方法:

$ git push SlamWishG2O master -f 這樣會使遠程修改丟失,一般是不可取的,尤其是多人協作開發的時候。

2.push前先將遠程repository修改pull下來

$ git pull SlamWishG2O master$ git push -u SlamWishG2O master
3.若不想merge遠程和本地修改,可以先創建新的分支:

$ git branch [name]
然后push
$ git push -u SlamWishG2O [name]

總結

以上是生活随笔為你收集整理的使用GitGUI创建上传本地工程的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。