git clone git@192.168.1.251:/home/gitrepetory/p1.git
git remote add origin git@192.168.1.251:/home/gitrepetory/p1.git
git init 初始化
git add?
git commit?
git pull?
git push?
關(guān)聯(lián)遠(yuǎn)程倉(cāng)庫(kù)
?git remote add origin git@git.oschina.net:yourname/demo.git
可能會(huì)出現(xiàn)的問(wèn)題:
??如果第二步寫(xiě)錯(cuò)了:則
? ? ? ?git remote rm origin ? //刪除origin
? ? ? ?git remote add origin git@git.oschina.net:yourname/demo.git ? //重新添加origin
關(guān)聯(lián)遠(yuǎn)程分支
git branch --set-upstream-to origin develop
合并分支
git merge develop
刪除分支
git branch -d develop
已有項(xiàng)目添加
1.git add . (將當(dāng)前目錄下的文件加入到倉(cāng)庫(kù))
2.git commit -m"the first commit project"(第一次提交項(xiàng)目文件)
3.gitremote add origin https://git.coding.net/solent/xingzuo.git
4.git push -u origin master (推送遠(yuǎn)程倉(cāng)庫(kù))