Add support for ignoring file changes temporary
joseluisq opened this issue · 0 comments
joseluisq commented
Ignoring files temporary is a useful feature when we need to quickly hide changes in a file(s) for awhile.
Using git update-index --[no-]assume-unchanged we can achieve this.
Proposal: I suggest to add an assume
command in order to perform this.
The idea comes from this link.
- Ignoring files: Ignoring two files which contain changes (
--assume-unchanged
):
~> assume Cargo.toml README.md
# then `state` command should show us a clean working tree
~> state
Current working tree status:
## develop
Behind the scenes:
~> git update-index --assume-unchanged Cargo.toml README.md
- Revert ignored files: Reverting ignored files above via
--no
flag (--no-assume-unchanged
):
~> assume --no Cargo.toml README.md
# then `state` command should show us changes in working directory
~> state
Current working tree status:
## master
M README.md
M Cargo.toml
Behind the scenes:
~> git update-index --no-assume-unchanged Cargo.toml README.md