Add text about -u option on Git stash documentation (#29849)

This commit is contained in:
exiam
2019-04-02 15:49:44 +02:00
committed by The Coding Aviator
parent 7fe404f342
commit 8699132ce9

View File

@@ -16,7 +16,7 @@ git stash save "optional message for yourself"
This saves your changes and reverts the working directory to what it looked like for the latest commit. Stashed changes are available from any branch in that repository. You can optionally use `git stash` to stash your changes without any message, and git will give it a default name.
Note that changes you want to stash need to be on tracked files. If you created a new file and try to stash your changes, you may get the error `No local changes to save`. To tell git to track a new file you created, run the command:
Note that changes you want to stash need to be on tracked files. If you created a new file and try to stash your changes, you may get the error `No local changes to save`. To stash all changes, including untracked files, you can add the `-u` option (or `--include-untracked`). To tell git to track a new file you created, run the command:
```shell
git add <name of the new file>