git工作流程

以财务开发为例子:

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请求合并代码

3. 开发紧急功能或者修复admin bug,过程同上,将分支名 finance-feature改成master即可。

相关推荐
2501_9032386513 分钟前
Git Bash:Windows下的强大命令行工具
windows·git·bash·个人开发
神明木佑2 小时前
datalist 是什么?以及作用是什么?
git
那片海还在吗4 小时前
使用 Git、Postman、Newman、Jenkins 与邮件构建自动化接口测试及通知流程
git·jenkins·postman
go54631584657 小时前
本地部署 GitHub 上的 Python 人脸识别项目
开发语言·python·github
heeheeai12 小时前
git 国内源
git
the_seventh_dog12 小时前
git | 团队协作开发注意事项
git
yinshuilan15 小时前
今日运维之-Mac笔记本python环境问题
运维·git·python·brew
辄也16 小时前
git拉取远程分支到本地分支
git
皮克斯的进化之路16 小时前
Git原理+使用(超详细)
git
wrjwww16 小时前
【Git学习笔记】Git常用命令
笔记·git·学习