admin管理员组文章数量:1406060
I have Mercurial Distributed SCM (version 6.1.1). I enabled and used the "uncommit" extension to solve the particular problem below, but I still want to know how I was supposed to do it with commit --amend
.
Say I have modified 4 files, a,b,c,d and I want to commit only file "a". The intention is to run the command
hg commit -m "Only file a should be committed" ./a
but I accidentally hit return prematurely, and run
hg commit -m "Only file a should be committed"
This commits all the files a,b,c & d.
Obsolete info on the internet says to use hg rollback
but rollback is no longer available. hg help -v rollback
prints the message
Please use 'hg commit --amend' instead of rollback to correct mistakes in
the last commit.
But commit --amend
is not rollback or undo, it merges current changes with the previous commit. So what would be a good way to use it in this scenario?
本文标签:
版权声明:本文标题:mercurial - How do you use hg commit --amend to replicate the functionality of the deprecated hg rollback - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744952701a2634173.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论