相关疑难解决方法(0)

git rebase vs git cherry-pick of detached branch

我有两个分支:

  1. TMP

tmp分支是分离的
我需要把tmp分支放在master优先解决冲突的顶部tmp

当我做

git checkout tmp
git rebase --strategy=recursive -X theirs master
Run Code Online (Sandbox Code Playgroud)

我得到了错误首先,重新回头重温你的工作......

fatal: Could not parse object '0a722ac51071ecb4d00b1ef45384aac227b942a0^'  
Unknown exit code (128) from command: git-merge-recursive 0a722ac51071ecb4d00b1ef45384aac227b942a0^ -- HEAD 0a722ac51071ecb4d00b1ef45384aac227b942a0  
Run Code Online (Sandbox Code Playgroud)

当我做

git checkout tmp
git cherry-pick --strategy=recursive -X theirs 0a722ac..384144a 
Run Code Online (Sandbox Code Playgroud)

工作良好

我有什么区别或如何使用rebase做同样的事情?

git git-rebase git-cherry-pick

2
推荐指数
1
解决办法
1055
查看次数

标签 统计

git ×1

git-cherry-pick ×1

git-rebase ×1