Fox*_*Gio 46 git sha git-branch git-cherry-pick
当我从另一个分支机构挑选一个提交时,我发现自己做了很多.
$ git log -1 another_branch
commit <commit_sha>
// copy <commit_sha>
$ git cherry-pick <commit_sha>
Run Code Online (Sandbox Code Playgroud)
我可以在一个命令中完成所有这些操作,如果是这样,它是什么?
pbe*_*ier 85
请跟:
$ git cherry-pick another_branch
Run Code Online (Sandbox Code Playgroud)
这将挑选来自another_branch的最后一次提交.
git中的分支只是对该分支中最后一次提交的引用,您可以在命令中使用它们而不是提交SHA.
归档时间: |
|
查看次数: |
10813 次 |
最近记录: |