Change command to avoid editing commit message

This commit is contained in:
Filipp Pirozhkov 2017-11-10 19:20:46 +03:00
parent 545a53e808
commit f60cd9d835
1 changed files with 2 additions and 1 deletions

View File

@ -133,10 +133,11 @@ In order to remove a file from a commit, do the following:
```sh
$ git checkout HEAD^ myfile
$ git add myfile
$ git commit --amend
$ git commit --amend --no-edit
```
This is particularly useful when you have an open patch and you have committed an unnecessary file, and need to force push to update the patch on a remote.
`--no-edit` option is used to keep the existing commit message.
<a name="delete-pushed-commit"></a>
### I want to delete or remove my last commit