1
0
mirror of https://github.com/k88hudson/git-flight-rules.git synced 2025-03-10 12:48:43 -03:00

Merge branch 'toptal-more-specific-removal-of-a-file-from-commit'

This commit is contained in:
Richard Littauer 2017-11-12 10:31:53 -05:00
commit a38b385b03

View File

@ -133,11 +133,11 @@ In order to remove a file from a commit, do the following:
```sh
$ git checkout HEAD^ myfile
$ git add -A
$ git commit --amend
$ git add myfile
$ 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.
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. The `--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