概述
在开发新需求的时候, 会基于Master分支拉取新的分支,然后在新的分支进行开发.
操作步骤和说明
新建分支命令说明:
git checkout -b refund_in_advance # 检出一个名字为 refund_in_advance 的分支
git push —set-upstream origin refund_in_advance 推到远端一个名字为 refund_in_advance 的分支
在项目文件夹根目录下进行操作:
PS E:\YeWuZhongTai\fh-oms\fh-oms> git checkout -b refund_in_advance
Switched to a new branch 'refund_in_advance'
M README.md
M oms-core/oms-core-service/oms-reverse-service/src/main/java/com/alibaba/oms/core/service/reverse/api/impl/ReverseBasePortalServiceImpl.java
PS E:\YeWuZhongTai\fh-oms\fh-oms> git push --set-upstream origin refund_in_advance
Total 0 (delta 0), reused 0 (delta 0)
To https://codeup.aliyun.com/5ee31556360ec3ecf8980cd5/firmus/fh-oms.git
* [new branch] refund_in_advance -> refund_in_advance
Branch 'refund_in_advance' set up to track remote branch 'refund_in_advance' from 'origin'.
PS E:\YeWuZhongTai\fh-oms\fh-oms>
查看效果
发现本地已经自动切换到了这个分支了
发现远端已经有了这个分支了