This is not a git-tower answer since I don't use that and know nothing of it, but just a general point about git stash
.
By default, git stash
(whose default action is to do a git stash save
) saves the contents of the current index (i.e., the next commit you have been building so far) and the contents of the current work-tree, and does so by making two commits. Because it makes commits, it obeys the usual rules for commits: only files already in the index get committed. This means that in particular, untracked and ignored files are not stashed.
The command-line version of git stash save
does, however, have two flags you can supply to modify this behavior. The -u
or --include-untracked
flag tells it to save untracked files, and the -a
or --all
flag tells it to save all (untracked and ignored) files. When using these flags, git stash save
simply makes a third commit as well, to hold these files.
The tricky thing that git stash save
does is to place these two or three commits outside the usual branch system, as a sort of bag on the side. It also cleans up (via git reset --hard
and, when using -u
or -a
, git clean
as well) the work-tree after saving your state by making its commits.
These tricks are convenient, but can be confusing. For those new to git it's probably better just to start with ordinary commits, since you should have tools with which to take private (unpublished) commits and modify and combine them (e.g., via interactive rebase and squash).