0. 克隆遠程倉庫
git clone 遠程倉庫地址
1. 拉取遠程的所有信息(不確定特定分支)
git pull
2. 查看所有遠程分支
git branch -a
拉取結果如下,*為所在的分支:
* master
remotes/origin/jiashi
remotes/origin/master
remotes/origin/word
3.切換分支,並在本地創建同樣的分支名。(例如切換到jiashi分支)
git checkout -b jiashi origin/jiashi
4.修改后推送到對應的分支
git push origin jiashi
參考來源:
https://stackoverflow.com/questions/1783405/how-do-i-check-out-a-remote-git-branch