Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
cst1992213475dHard reset doesn't work for stashes, it's to clear away a dirty working directory.
'git stash clear' is the big brother of drop; it clears all stashes at once. Use carefully.
jesustricks109174doh I meant to say "that you git stash apply'd" sorry.
I didn't know about git stash clear lol, I'm scared of it now
cst1992213474dYou could do the same thing with commits as well, since you can also checkout a commit instead of a branch(detached HEAD), you just make smaller commits as you go along. Then when you're done, just squash your local changes and push.
For me, stashing isn't a part of workflow like for you, so clearing isn't risky; it's more like if I know I don't need any of the stashes I have, I just clear them out.
I use stashing for only one purpose: getting the changes out of my way if I want to checkout to another place.
Why do you not use pop? It's a safety net if you have conflicts; it works the same as apply. It drops if it knows you don't need the changes anymore.
cst1992213474dBTW, run tests before you commit, not after. That mitigates the risk of pushing buggy/untested code. If you do a git push and you have commits already, they'll be pushed. If not, you'll just get 'Everything up to date.'
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job