Added more text to amend section to explain when it is good to edit a commit

This commit is contained in:
Richard Littauer 2015-08-18 15:53:51 -04:00
parent 4622e309f1
commit 6722c72350
1 changed files with 4 additions and 0 deletions

View File

@ -67,10 +67,14 @@ For clarity's sake all examples in this document use a customized bash prompt in
<a name="amend"></a>
## I wrote the wrong thing in a commit message
If you wrote the wrong thing and the commit has not yet been pushed, you can do the following to change the commit message:
```sh
git commit --amend
```
If you have already pushed the message, you can amend the commit and force push, but this is not recommended.
## I need to add staged changes to the previous commit
```