Hacker News new | ask | show | jobs
by vannucci 2664 days ago
I realized just how useful shell scripting is (bash) when it occurred to me a simple five line script I wrote to erase and reclone my main work repo is the single most useful piece of code I’ve written in my first year as a web developer. God that’s a time saver.
1 comments

The first thing I thought when I read this is why do you have to do this so often that you scripted it? It's good that you thought of a way to save time but this solution seems like a very blunt instrument to get back to some previous state.
Most likely answer is “git’s ux”, in my experience. So often it’s just faster and reassuring to reclone rather than resolve some unusual state you’ve accidentally put your local repo in, because a command didn’t do what you expected it to do.