【发布时间】:2021-03-08 08:05:14
【问题描述】:
我返回了一些提交:
> git reset --hard e7aec0fea8ed66e17c277298eebecae58ff044aa
> git status
On branch some-branch
Your branch is behind 'origin/some-branch' by 51 commits, and can be fast-forwarded.
我想合并一个较新的提交,但不是最新的。概念上是这样的:
> git ???
> git status
On branch some-branch
Your branch is behind 'origin/some-branch' by 50 commits, and can be fast-forwarded.
理想情况下,它允许选择步数:
Your branch is behind 'origin/some-branch' by 50 commits, and can be fast-forwarded.
> git ??? --steps 2
> git status
On branch some-branch
Your branch is behind 'origin/some-branch' by 48 commits, and can be fast-forwarded.
在 git 中可以吗?
为什么不平分?
看起来我想要git bisect,但很难决定何时使用git bisect good,何时使用git bisect bad。我想从某个已知点开始,逐步向原点提交。
为什么不this thread ("git fast-forward one commit")?
该线程的解决方案允许 ff 到指定的提交而不是 master,但您必须手动指定提交哈希。我正在寻找一种不需要哈希的方法。
【问题讨论】:
标签: git