Git · Junior · Question 71 of 75
What does git commit --amend --no-edit do?
- 1Changes only the author of the most recent commit
- 2Creates an empty commit with the same message
- ✓Correct answer: Adds staged changes to the last commit, same message
Explanation
Handy when you forgot a file: stage it and amend without retyping the message. The commit still gets a new hash.