使用bash上传项目到osc@git上
首先要參照http://my.oschina.net/dxqr/blog/134811?p=2#comments
我每次第一次提交的時候都會遇到這個問題
第一次次將現有的項目提交到git上面會遇到這個問題。
$ git remote add test http://git.oschina.net/liangzhenghui/gitTest.git
Administrator@KEN ?/g/code/gitTest/HelloWorld (master)
$ git push test master
Username for 'http://git.oschina.net': liangzhenghui
Password for 'http://liangzhenghui@git.oschina.net':
To http://git.oschina.net/liangzhenghui/gitTest.git
! [rejected] ? ? ? ?master -> master (fetch first)
error: failed to push some refs to 'http://git.oschina.net/liangzhenghui/gitTest
.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
然后可以按照osc上朋友的方法這樣解決:
先, git pull origin master
再 ? ?git push origin master
轉載于:https://my.oschina.net/liangzhenghui/blog/189425
總結
以上是生活随笔為你收集整理的使用bash上传项目到osc@git上的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数字化时代的K12与学前教育行业洞察
- 下一篇: java 缓存 30秒后失效_如何处理缓