It is said in IDEA documentation
Select this check box to have IntelliJ IDEA bring the changes staged in the index to your working tree for examination and testing.
Can somebody please explain what does this mean?
Stashing changes is very similar to shelving. The only difference is in the way patches are generated and applied. Stashes are generated by Git, and can be applied from within IntelliJ IDEA, or outside it. Patches with shelved changes are generated by IntelliJ IDEA and are also applied through the IDE.
git stash temporarily shelves (or stashes) changes you've made to your working copy so you can work on something else, and then come back and re-apply them later on.
Use git stash when you want to record the current state of the working directory and the index, but want to go back to a clean working directory. The command saves your local modifications away and reverts the working directory to match the HEAD commit.
This determines if the stash is created with the git --keep-index
flag.
From GIT docs:
If the
--keep-index
option is used, all changes already added to the index are left intact.
So in other words, any files you've added to git will also remain outside of the stash when you create it. Whereas normally newly added files would be removed after stashing. (See this question for a more indepth description of where the index is.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With