• Otter@lemmy.ca
    link
    fedilink
    arrow-up
    33
    ·
    7 hours ago
    rm -rf *
    
    git add -A
    git commit -m "oops."
    
    rm -rf .git
    git init
    git add .
    git commit -m "bye."
    
    git push origin main --force
    
      • Otter@lemmy.ca
        link
        fedilink
        arrow-up
        5
        ·
        6 hours ago

        Oh good point 🤦

        So maybe instead, we can clear all local + remote branches and tags, create a blank branch, delete main, rename the blank branch to main, then delete .git

        Although the OP says that we can merge anything, and we might not have access to mess with branches

    • Otter@lemmy.ca
      link
      fedilink
      arrow-up
      11
      ·
      7 hours ago

      I’m not sure about the git history wipe, I can’t test it myself right now