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

相关推荐
逛逛GitHub11 小时前
刚刚!Open AI 宣布开源?
github
不是伍壹15 小时前
【R语言】GitHub Copilot安装-待解决
github·copilot
虾饺爱下棋15 小时前
pycharm上传github问题:rejected
人工智能·深度学习·github
鸠摩智首席音效师15 小时前
如何在 GitHub 中创建一个空目录 ?
github
Mr.W.T18 小时前
Spring Boot “约定大于配置”
github
2401_8260976219 小时前
同步&异步日志系统-日志落地模块的实现
c++·git·vim
半旧夜夏19 小时前
阿里云IOT消息处理
java·ide·git·物联网·spring·阿里云
我们的五年21 小时前
【Git版本控制器】第三弹——版本回退,撤销修改,删除文件
大数据·linux·git
一名嵌入式糕手21 小时前
Git从基础到进阶
git
不cong明的亚子1 天前
github用户名密码登陆失效了
git·github