Hacker News new | ask | show | jobs
by inopinatus 3568 days ago
Honestly, the proper command is not rm at all, because you can then have an "oh shit I forgot something" moment. I have learned (the hard way) to retain even an horribly broken repo, but shove it out of the way. Because disk is cheap, repeating work is expensive.

So that example should have been:

    cd ..
    mv fucking-git-repo-dir fucking-git-repo-dir.archived.$(date +%s)
    git clone https://some.github.url/fucking-git-repo-dir.git
1 comments

  git fetch origin master && git reset --hard origin/master
imo