k88hudson / k88hudson/git-flight-rules
Removing changes to a file from the previous commit
Open
- Dominant language
- No language data
- Stars
- 42.6k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
This is what the current README has:
```sh
$ git checkout HEAD^ myfile
$ git add myfile
$ git commit --amend --no-edit
```
This has the disadvantage of reverting the change entirely.
Another option is to use:
```sh
$ git reset HEAD^ myfile
$ git commit --amend --no-edit
```
which is one less command, *and* preserves the changes to the file in the working tree, while removing it from the commit.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.