views:

52

answers:

2

I am a Git newbee with UNIX SCCS and Microsoft Visual SourceSafe experience.

I’ve created a repository, looked at what Git created, and can’t find the files anywhere under the .git tree. So, how do I know my files are safely stored in Git?

+1  A: 

Which files?

Git doesn't store duplicates of the files. The contents of a Git repository's .git directory is essentially a database of all the content tracked by Git, along with commits, tags, and so forth.

If your repository is a non-bare repository, it will have a working tree associated with it. The working tree is the most current representation of the files tracked by Git.

mipadi
So, no longer using SCM (Source Code Management) for backup, eh?
PalaDolphin
Well, given a `.git` repository, Git can easily create a working tree with a simple `git checkout`.
mipadi
I would not recommend using any SCM as backups in general. I also wouldn't recommend using a backup system as an SCM. The .git directory contains everything you need to reconstruct every version of every file you've ever committed.
Dustin
A: 

You can also clone the repository to see that you get what you expect.

Zitrax