如果我有 N
提交,我如何从 N-3
提交分支?
最佳答案
使用提交哈希创建分支:
git branch branch_name <commit-hash>
或者通过使用符号引用:
git branch branch_name HEAD~3
要在创建分支时 check out 分支,请使用:
git checkout -b branch_name <commit-hash or HEAD~3>
关于git - 使用 Git 从先前的提交分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2816715/