Skip to content

Instantly share code, notes, and snippets.

@paulocoutinhox
Created January 13, 2022 06:43
Show Gist options
  • Save paulocoutinhox/a3919ce57a9d2a73ae36ee143fa652aa to your computer and use it in GitHub Desktop.
Save paulocoutinhox/a3919ce57a9d2a73ae36ee143fa652aa to your computer and use it in GitHub Desktop.

Revisions

  1. Paulo Coutinho created this gist Jan 13, 2022.
    7 changes: 7 additions & 0 deletions git-clear-repository.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    git checkout --orphan newBranch
    git add -A
    git commit -am "clean repository"
    git branch -D main
    git branch -m main
    git push -f origin main
    git gc --aggressive --prune=all