Search code examples
gittortoisegit

Where are git database files stored on windows?


I've installed git, created a rep, checked in and made changes to some files but I want to know where git stores the repo db and the master files so I can back them up.

Thanks


Solution

  • Git saves everything (local to your current repository) in the .git folder.

    An extensive description can be found on gitready for example.

    2 of them you are probably interested in:

    • objects: Git’s internal warehouse of blobs, all indexed by SHAs.
    • refs: The master copy of all refs that live in your repository, be they for stashes, tags, remote tracking branches, or local branches.

    For backups or transferring your local repository, zipping or copying your .git folder is enough.