Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
taigrr9807d1. Don't *ever* reset hard, that's a bad idea. There are several better ways.
2. You really should commit more often, but I get it, habits are hard. Maybe this'll teach you :'(
3. If you don't want to learn a habit, I recommend modifying your PS1 variable to include the status of the current folders git repo. There are some really neat bash/zsh/ksh/whatever scripts for you to have some symbols at the end of your prompt. I added some a few years back, can't do without it now.
Mine uses ! For uncommitted changes, + for new files, * for unpushed refs, - for deletion, and has the branch name at the end, and I love it!
We all learn this, then we push it deep deep down and deny deny deny.
Better git gud :/
echonox6627dDear God, i was about to fall a sleep and then i read this horror story...
So the first answer is "commit more, rebase later". That way if you screw up it's easy to fix.
Of course, that doesn't always work. If you want to just go back for a bit, look into git stash and git stash pop. They are probably pretty close to what you're already doing but are much safer.
As to my PS1, I haven't gotten around to publishing a public one yet, but here's some of the git bits in my shell: https://ipfs.io/ipfs/...
Adding shell coloring is easy, a matter of escape sequences etc. to the if/fi blocks.
To use it, stick it in your home directory, in a file called .bash_PS1 and then put "source ~/.bash_PS1" in your .bashrc
Hope that helps.
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