3 ms·
My #1 use of stash is as the quickest way to express "get rid of all this crap". I rarely intend to ever retrieve it.
by ashark 10y ago
My #1 use of stash is as the quickest way to express "get rid of all this crap". I rarely intend to ever retrieve it.
- ianleeclark 10y agogit checkout -- . Also works well for this use case
- loeg 10y ago'git reset'.
- ashark 10y agoDoesn't do the same thing, without some more options. Stash is shorter.
- dahart 10y agoNow here's one I actually like. As an alternative to git reset, a git stash is safer, and gives you an easier way than reflog to recover if you dropped a commit you want back.
- spike021 10y agoFor one of my projects, the 'build process' requires that I use the git archive command (basically archive to .tar.gz without any git-related files/directories). git archive on its own is fine for final builds because it's based off of HEAD for the current branch, but if I want to test a build with working changes, I would either need to commit all the changes _or_ use git stash and then archive based on the state I just stashed. So in this case git stash works a lot better for a 'temporary' commit, kind of deal. It might not be optimal but I've found the process to work pretty well for this particular project's situation.