How do I stop a Git commit when VI is on the screen waiting for a commit message? -
i have asked git perform commit within git bash, has brought vi does.
i wish cancel commit, how prevent proceeding commit point?
you have 2 options:
provide empty commit message. if it's new commit , haven't yet saved message, can use
:q!
(quit without saving). if you’ve saved (or you're amending previous commit), delete entire log message , save again. can done ggdg +:wq
in vim.have editor exit non-zero exit code. in vim, can use
:cq
(quit error code).
it's worth noting can reset working copy state in before commit git reset head^
.
Comments
Post a Comment