我正在使用以下 Git 命令来创建一个新的远程分支:
git push origin origin:refs/heads/new_branch_name
我希望新分支将从旧的提交开始,
我该怎么做? (我试过一些不同的方法,虽然失败了)
谢谢。
最佳答案
git checkout -b new_branch_name
git reset --hard <old_commit_id>
git push origin new_branch_name
关于Git - 从旧提交中创建一个新的远程分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24833198/