Git · Junior · Question 27 of 75

How do you fix the message of the last commit before pushing?

Explanation

--amend replaces the last commit with a new one, so you can also add forgotten files. Since it rewrites history, avoid it on commits that others already pulled.

Further reading

Problem with a question

Git · Junior · question 27

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz