需求
不實用git checkout
命令的情況下實現指定分支的git pull
實現
假設當前在均處於develop分支
更新當前分支
將本地develop分支更新至與master對齊
git pull origin master
更新其他分支
將本地master分支更新至與master對齊
git fetch origin master:master
不實用git checkout
命令的情況下實現指定分支的git pull
假設當前在均處於develop分支
將本地develop分支更新至與master對齊
git pull origin master
將本地master分支更新至與master對齊
git fetch origin master:master
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。