git,如何引用当前分支中的最后提交 [英] git, how to reference last commit in current branch
问题描述
编写代码时,我喜欢在已取得一些进展的阶段进行提交,因为我使用cli作为git,所以我必须使用-m选项一次又一次地输入相同的提交消息。
阅读git文档,其中有-C的提交选项,可以重复使用来自特定提交的消息。
是否有任何简单的方法可以引用上次提交在工作分支?
git commit -C:LastCommit(类似这样的可能吗?)
HEAD引用最后一次提交。但老实说,你的问题很奇怪,因为使用最后的提交信息应该是例外......
While writing code i like to commit at stages where some progress has been made, as i use cli for git i have to type same commit message again and again using -m option.
reading git documentation there is -C option for commit which can reuse message from specific commit.
Is there any easy way to refer last commit in working branch?
git commit -C :LastCommit(Something like this possible?)
HEAD references the last commit. But honestly your question is strange since using the last commit message should be exceptional...
这篇关于git,如何引用当前分支中的最后提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!