To change the commit message of the most recent commit, use the command git commit --_______.
- amend
- edit
- modify
- change
The correct option is amend. The git commit --amend command allows you to modify the most recent commit message. It opens the default text editor for you to make changes. This is useful when you need to fix a typo or provide additional information to the commit message without creating a new commit.
Loading...
Related Quiz
- Which Git command is used to undo the last commit while keeping the changes in the working directory?
- A developer accidentally committed a file that should not be tracked by Git. What command should they use to rectify this before pushing?
- What are the implications of using git rebase in a collaborative environment?
- During a code review, a team member identifies an issue that could potentially break the build. What Git feature allows for collaborative discussion and resolution?
- How can you find a commit in the Git history that introduced a bug using the git bisect command?