在一个分支的头上获得一系列提交 [英] Get a series of commits on a detached head onto a branch
本文介绍了在一个分支的头上获得一系列提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
- set-upstream
,因为我不在分支上。我需要结账一个新的分支,并樱桃选择并提交他们所有五个单独? 解析方案你可以创建一个新的分支
如果你想通过创建一个新分支来保留它们,这可能是个好时机
可以这样做:
git分支new_branch_name<第五次提交的SHA>
I have five commits on a detached head. I can't --set-upstream
, because I'm not on a branch. Do I need to checkout a fresh branch, and cherry pick and commit all five of them individually?
解决方案
Rose, it looks like you can just make a new branch
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch new_branch_name <SHA of fifth commit>
这篇关于在一个分支的头上获得一系列提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文