【git】冲突解决

1、来到 master 分支 —— > git pull origin master
2、来到 feat 开发分支 ——> git rebase master
冲突

wjy@123deMacBook-Pro erda % git rebase master
Auto-merging pkg/arrays/arrays.go
CONFLICT (content): Merge conflict in pkg/arrays/arrays.go
Auto-merging pkg/arrays/arrays_test.go
CONFLICT (content): Merge conflict in pkg/arrays/arrays_test.go
error: could not apply d599ade49... feat: metrics addition item IDs
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply d599ade49... feat: metrics addition item IDs

3、手动选择

<<<<<<< HEAD
// 以下是当前分支的更改
// ...
=======
// 以下是 master 分支的更改
// ...
>>>>>>> d599ade49... feat: metrics addition item IDs

解决冲突意味着根据需要手动编辑这个文件,将冲突标记和不需要的更改部分删除或修改。

4、git add .
5、git rebase --continue

即可解决冲突,最后push即可

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不之道

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值