GIT合并分支到master上

Git 是常用的版本管理工具

最下方有常用的 git 指令,记住后可以大大提升工作效率

假设现在是在 feature/smart 分支上,要合并代码到 master 分支,可以用以下方式:

1、提交当前代码

	git  add .
	git  commit -m 'feature/smart'
	git push -u origin feature/smart

2、查看所有分支和当前分支

	git branch

3、切换到 master 分支

	git  checkout master

4、考虑到多人开发, 需要把远程master上的代码pull下来

	git pull origin master

5、然后把 feature/smart 分支的代码合并到 master 上

	git  merge feature/smart

6、然后 push 到远程 master 上就好了

	git push origin master

在这里插入图片描述

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值