3 ms·
> For example, if I write exploratory code to test out a feature or throwaway code to do some analysis—anything I might want to use again, but don't want to com
by saagarjha 7y ago
> For example, if I write exploratory code to test out a feature or throwaway code to do some analysis—anything I might want to use again, but don't want to commit to the codebase—I'll add it as a commit and then immediately revert the commit (i.e. make a new commit that deletes what I just added).
Why not use a named stash for something like this? It'll keep your history cleaner, and you can always find the stash by name later.
- brazzy 7y agoCan stashes be pushed to a remote repo?
- dang 7y agoToo complicated for me. I didn't even know that named stashes were a thing, and I wouldn't remember the names. The nice thing about the approach is that there's only one place to look. I don't think it makes the history less clean, since it only contains things that were at some point, if only briefly, in the system.