Since Git 1.7.9
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 or tag, which may or may not be important to you.
More Related Contents:
- How to modify existing, unpushed commit messages?
- How do I push amended commit to the remote Git repository?
- Edit the root commit in Git?
- How does git commit –amend work, exactly?
- How to undo “git commit –amend” done instead of “git commit”
- How to find the commit in which a given file was added?
- Accidentally pushed commit: change git commit message
- Commit only part of a file in Git
- Remove sensitive files and their commits from Git history
- How to revert multiple git commits?
- Undo git reset –hard with uncommitted files in the staging area
- How to remove selected commit log entries from a Git repository while keeping their changes?
- How can I revert multiple Git commits?
- Remove specific commit
- Start a Git commit message with a hashmark (#)
- Skip Git commit hooks
- Git: How to ignore fast forward and revert origin [branch] to earlier commit?
- How to list all commits that changed a specific file?
- How do I make a Git commit in the past?
- How to fix committing to the wrong Git branch?
- How can I split up a Git commit buried in history?
- What is a dangling commit and a blob in a Git repository and where do they come from?
- List commits between 2 commit hashes in git
- Why Git is not allowing me to commit even after configuration?
- git commit frequency
- Git: How can I find a commit that most closely matches a directory?
- Git commit that doesn’t override original authors in git blame
- Can you change a file content during git commit?
- Git: add vs push vs commit
- Git commit with no commit message