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

相关推荐
Moment2 小时前
腾讯终于对个人开放了,5 分钟在 QQ 里养一只「真能干活」的 AI 😍😍😍
前端·后端·github
小兵张健16 小时前
开源 playwright-pool 会话池来了
前端·javascript·github
goodspeed17 小时前
Git Worktree:多分支并行开发的利器
git·github
Moment2 天前
Vibe Coding 时代,到底该选什么样的工具来提升效率❓❓❓
前端·后端·github
雮尘2 天前
让 AI Agent 高效并行开发的命令-git worktree
人工智能·git·agent
有道AI情报局3 天前
网易有道龙虾 NAS 服务器部署与实战指南
github
徐小夕3 天前
JitWord 2.3: 墨定,行远
前端·vue.js·github
南果梨3 天前
OpenClaw 完整教程!从安装到使用(官方脚本版)
前端·git·开源
CoovallyAIHub3 天前
实时视觉AI智能体框架来了!Vision Agents 狂揽7K Star,延迟低至30ms,YOLO+Gemini实时联动!
算法·架构·github