1. 克隆代碼庫(kù)
git clone git@192.168.1.105:zxy123/peanut.git
2.創(chuàng)建自己的分支
git checkout -b 自己分支名字?
3.自己本地做一些修改并提交
git add a.txtgit commit -m"增加a.txt"
4.將代碼提交到遠(yuǎn)程分支
? ? ? ???4.1獲取遠(yuǎn)端master的更新
? ? ? ? ?git fetch origin master
? ? ? ? ?4.2從origin/master進(jìn)行rebase
? ? ? ? ? git rebase origin/master
? ? ? ? ?4.3如果有沖突德频,rebase會(huì)暫停下來(lái)闽铐,沒有沖突跳過4.3 4.4步驟
? ? ? ? ?運(yùn)行g(shù)it status?查看沖突的文件并解決 確認(rèn)沒問題以后魄梯,運(yùn)行?git add? filename?添加沖突的文件到staged區(qū)域
? ? ? ???4.4繼續(xù)進(jìn)行rebase操作
? ? ? ? git rebase --continue
? ? ? ? 4.5將本地分支推送到遠(yuǎn)程
? ? ? ? git push origin 自己分支的名字