以财务开发为例子:
1. 新建分支
1.1. upstream新建分支:finance-feature
1.2. origin新建对应分支:finance-feature
1.3 新建本地分支
git branch finance-feature
注:
同步远程分支:git fetch upstream feature-name
git fetch origin feature-name
e.g.git fetch upstream finance-feature
查看本地分支:git branch
查看远程分支:git branch -r
切换分支:git checkout branch-name
e.g.git checkout finance-feature
2. 开发finance-feature功能
2.1 拉取代码
git checkout finance-feature
git pull upstream finance-feature
git pull origin finance-feature
2.2 coding......
2.3 推送代码
git push origin finance-feature
2.4 提MR请求合并代码