Since you said in the comments that you really wanted to not select one particular file by default, changelog.txt
, you can tell Git to ignore changes to that file, and then hopefully WebStorm will not detect the changes either.
There are two similar features for ignoring changes to a file in Git: --assume-unchanged
and --skip-worktree
. See Git - Difference Between 'assume-unchanged' and 'skip-worktree' for the difference. You probably want --skip-worktree
.
You can use it in your case like this:
git update-index --skip-worktree changelog.txt
Now git status
won't include your change to changelog.txt
in its list.
When you're finally ready to actually commit the change, run
git update-index --no-skip-worktree changelog.txt
The comments of http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html suggest some aliases to make the above commands easier to run, although that article only discusses --assume-unchanged
, not --skip-worktree
.