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即可。

相关推荐
不搞学术柒柒1 分钟前
Git新功能完整开发提交流程
git
用户84913717547161 小时前
想做护眼工具却脑子一片空白?我用 OpenSpec 把模糊想法聊成了 v0.1
github·vibecoding
wangruofeng2 小时前
git-filter-repo 把 .git 从 112MB 砍到 1.4MB,但漏推 tag 让 clone 又胖回来
github·devops
峰向AI3 小时前
Block 放出大招!Buzz:一个中继统一代码、聊天、CI 全流程
github
dong_junshuai3 小时前
每天一个开源项目#47 4.4K Stars 的 LikeC4:让架构图随代码进化
github
午安~婉4 小时前
Git中SSH连接
前端·git·gitee
888CC++5 小时前
VS Code Git 工作树:解锁多分支并行开发新体验
git
阿虎儿5 小时前
Git exclude 功能解析
git
独立开阀者_FwtCoder5 小时前
最近做了一个健身小程序:智形健身助手,健身的佬们来提点意见
前端·javascript·github
隔窗听雨眠6 小时前
VS Code Git工作树:多分支并行开发的完整实践方案
git