Git stash new files

broken image
broken image
broken image

gitignore might be causing a file to be ignored when you're trying to git stash it. You can, however, force-add ignored files and then stash them. Please note that by default, git add will exclude explicitly ignored files (as defined in.

broken image

You can also use the git add command to start tracking the untracked files, and following that you can use the git stash command to stash all the tracked files, for example, in the following way: You may force-add ignored files and then stash them, or alternatively, you may stash all files (including tracked, untracked and ignored files). Note, however, that this will exclude explicitly ignored files (as defined in. This would include all tracked and untracked files. If you wish to also include untracked files then you could simply append the -include-untracked (or -u shorthand) flag to the git stash command: By default, git stash only stashes modified and staged tracked files.

broken image