git 拉取分支合並master&&回滾


1、git checkout -b xxx   新建自己的分支

2、git push origin xxx    把自己分支上傳gitlab

3、git add .                                          提交本地文件

4、git commit -m "xx的分支"

5、git pull                                            拉取master代碼

6、git push                                           上傳代碼

7、git checkout master                       切到master分支

8、git merge xxx           合並

9、 git status                                      查看狀態

10、git push                                        最終合並到master

 

回滾相關

1、git reset --hard fb479960c0cec5549463ae123d70bdd72ccf6be7

2、查看狀態

git status

3、提交

git push origin master

或者加入-f參數,強制提交,遠程端將強制跟新到reset版本
git push -f origin master

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM