git上傳提交我的心得

git提交路徑修改
git remote set-url origin url
git remote set-url 是修改遠程的url的命令,前提是要先有遠程urlgit

so 你必須先增長一個遠程urlurl

git remote add origin 「xxx.git"ip

pull push 後面要加分支名稱的問題rem

git branch --set-upstream-to origin/masterit

pull不能合併問題
git pull origin master --allow-unrelated-historieast

Updates were rejected because the tip of your current branch is behind
1.使用強制push的方法:
git push -u origin master -fstream

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

git pull origin master
git push -u origin master
3.若不想merge遠程和本地修改,能夠先建立新的分支:方法

git branch [name]
而後push遠程

git push -u origin [name]

相關文章
相關標籤/搜索