Step1,登陸自己的github并fork spring-cloud-alibaba
(
https://github.com/spring-cloud-incubator/spring-cloud-alibaba),fork完成後效果如下
Step2,複制自己github中spring-cloud-alibaba項目位址,使用git clone
https://github.com/jianzh5/spring-cloud-alibaba(自己倉庫)到本地
git clone
https://github.com/jianzh5/spring-cloud-alibabaStep3,使用git remote add upstream建立源版本upstream,即你fork的項目位址
git remote add upstream https://github.com/jianzh5/spring-cloud-alibaba
Step4,使用git remote -v 檢視所有版本記錄
Step5,使用git fetch upstream 将源主機的更新全部取回本地
git fetch upstream
Step6,使用 git branch -a 檢視所有版本
Step7,将源主機更新與本地代碼合并,此時需要指定版本,我們這裡選擇master版本
git merge upstream/master
Step8,将合并後的代碼送出到自己github上
git add .
git commit -m “Sync from upstream”
git push
經過這幾步即可完成對代碼的合并送出與更新,登陸github檢視同步後的效果。
小夥伴們趕緊去試一試吧~~