Hacker News new | ask | show | jobs
by hacksonx 3565 days ago
I think the command we're looking for is 'rm -R name_of_directory'
3 comments

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

  git fetch origin master && git reset --hard origin/master
imo
At least in GNU rm, -R and -r are synonymous. -f suppresses all prompts ("remove write-protected file ...?"), so the parent is also correct :)
Need to use `-f` when dealing with git repositories unfortunately.