只合并自己提交的 commit:

只合并自己提交的 commit:

// 修改之前的 commit id (不包含选中的 commit id)
git reset 'commit id'

// 存到暂存区
git stash -u  (和git stash apply 0对应)
or 
git stash   (和git stash pop对应)

// 以master为基准 创建临时分支
git checkout -b feat/temp

// 把暂存区修改的commit id 修改的内容 添到当前工作去(合并时有冲突解决冲突)
git stash apply 0 (和git stash -u 对应)
or 
git stash pop (和git stash 对应)

// 重新添加 并提交
git add -u

// 提交
git commit -m 'feat:'

// 根据提示操作
git push 
or 
git push --set-upstream origin feature/zl_temp

// 切换主分支
git checkout master

// 合并到主分支
git merge feat/temp

// 推送远程仓库
git push
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值