Reputation: 11430
As a Git beginner, I am using
I am working on the master branch with many breaking changes that I do not want to commit yet, but need to immediately add features to the last release. I read that Stash Save is the answer.
I have some files that I use in all versions such as a local configuration config.php, some test files etc. that should not be commited to the remote repository, so they are untracked or ignored.
Tortise Git gives the include untracked
and --all
options, and both of them remove ignored files from the reverted working directory.
Is it possible using Tortise Git or otherwise to keep ignored files in the reverted workign directory?
Upvotes: 3
Views: 3270
Reputation: 44347
A normal git stash
without flags keeps the ignored files intact. They are not removed.
In TortoiseGit this means leaving include untracked
and --all
unchecked:
If you wish to stash (and remove) both your modified and untracked files, but not your ignored files, then use the include untracked
option (git stash --include-untracked
):
Upvotes: 1