Git:git pull-从特定的提交开始,直到最新的提交跳过1个提交?

问题描述 投票:1回答:1

我如何从分支中拉出以开始对特定提交进行提取?

假设,我有这些分支:branch1oldbranch1

branch1oldbranch1的回滚版本>

并且假设,oldbranch1具有以下提交:

  • commit_5
  • commit_4
  • commit_3(将somebranch合并到oldbranch1)] >>
  • commit_2
  • commit_1
  • 并且在branch1上:

    • commit_2
  • commit_1
  • 现在,我想从oldbranch1中获取更新,而从commit_3中跳过oldbranch1,因为它包含错误的合并,从而删除了commit_2commit_1中的更改

    我该怎么办?有什么魔术命令吗?

我如何从分支中拉出以开始对特定提交进行提取?假设我有以下分支:branch1和oldbranch1 branch1是oldbranch1的回滚版本,并假设oldbranch1 ...

git laravel bitbucket git-pull git-fetch
1个回答
1
投票

跳过提交主要意味着git rebase --interactive

  • 您在git rebase --interactivetmp oldbranch1)的顶部创建了git branch分支
© www.soinside.com 2019 - 2024. All rights reserved.