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

相关推荐
Hommy883 小时前
【开源剪映小助手】API 接口文档
开源·github·aigc·视频剪辑自动化·剪映api
laowangpython4 小时前
Rust 入门:GitHub 热门内存安全编程语言
开发语言·其他·rust·github
习惯就好zz5 小时前
Git 交互式 rebase 实战:将后续修改合并到历史提交
git
我科绝伦(Huanhuan Zhou)8 小时前
探索技术世界:我的GitHub数据库工具宝库
数据库·github
带娃的IT创业者9 小时前
GitHub Stacked PRs:重塑现代软件开发的工作流革命
github·软件开发·工作流·代码审查·pull request·stacked prs
今夕资源网10 小时前
Windows Terminal更舒适的命令行环境 仅11MB 支持并行运行WSLLinux子系统 github开源项目
windows·github·命令行·cmd·terminal
蝎子莱莱爱打怪11 小时前
小孩儿才做选择!Hermes 和OpenClaw 我都要!
人工智能·后端·github
CoderJia程序员甲11 小时前
GitHub 热榜项目 - 日榜(2026-04-29)
ai·大模型·github·ai教程
南棱笑笑生12 小时前
20260429给万象奥科的开发板HD-RK3576-PI适配瑞芯微原厂的Android14时删除全部的.git目录
git·rockchip
逛逛GitHub12 小时前
推荐 3 个 GitHub 画图 Skill,一句话生成流程图、架构图。
github