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

相关推荐
_道隐_25 分钟前
git stash save 和 git stash push有什么区别?
git
人工智能研究所1 小时前
GitHub 10k+ Star:用自然语言描述系统,AI 帮你生成可交互架构图
人工智能·github·交互·自然语言·系统架构图·archify
逛逛GitHub1 小时前
一个 Skill.md 拿下 1.8 万星,这个 GitHub 项目让 AI 先说重点。
github
云空2 小时前
《GitHub 从入门到进阶完整教程》
github
Timeless1592 小时前
Git与TortoiseGit使用教程:第二章 Git常用命令及TortoiseGit使用教程
github
_道隐_3 小时前
git stash如何pop指定的stash change?
git
用户69371750013843 小时前
深夜炸场!DeepSeek 没发新模型,却重构了整个 Agent 生态
前端·后端·github
fthux3 小时前
装闭 RenoPit 源码解析(08):多模态AI调用、重试与文本降级
人工智能·ai·开源·github·open source·renopit
笨鸟先飞,勤能补拙4 小时前
AI Agent应用领域深度解析:从概念到落地的全维度审视
大数据·人工智能·python·物联网·安全·网络安全·github
JenKinJia4 小时前
Pycharm中增加远程服务器解释器无法连接的问题
服务器·pycharm·github