Search code examples
gitsourcetree

How to make the current working copy, the first commit


I have a lot of large history that makes downloading my repository quite a long day for new developers.

Is there a quick way to just forget all history of my git repository and make the current working copy, the first commit... therefore removing all of my bulky history?


Solution

  • Simplistically,

    rm -r .git ; git init
    

    Though that will also remove branches, tags, and that warm fuzzy feeling that you get from knowing that you can go back to before you accidentally deleted all your code.