Reputation: 61
I add .gitignore.Like this: prebuilts out
I use "git stash -A" to stash my modifies,but prebuilts folder,out folder also stash. I don't want stash my ignore folder,what can I do ?
Upvotes: 4
Views: 4876
Reputation: 1323403
You might not want to use git stash --all, since the doc mentions:
If the
--all
option is used instead then the ignored files are stashed and cleaned in addition to the untracked files.
And if some ignored files are still stashed, make sure they were not already tracked: do a git status
before the stash: if the out folder has some files currently modified, that means they were added to the index and tracked already (git add -f
would be able to add a file even if it is declared ignored)
Check also which ignore rule actually does (or does not) apply to any file with:
git check-ignore -v -- afile
Upvotes: 4