Is there a way to amend a commit without vi
(or your $EDITOR
) popping up with the option to modify your commit message, but simply reusing the previous message?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
git commit -C HEAD --amend
will do what you want. The -C option takes the metadata from another commit.Since git 1.7.9 version you can also use
git commit --amend --no-edit
to get your result.Note that this will not include metadata from the other commit such as the timestamp which may or may not be important to you.
Another (silly) possibility is to
git commit --amend <<< :wq
if you've got vi(m) as$EDITOR
.