Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
All right, let's create a Git repository. Git repositories, unlike TFS and Subversion, actually live in the directory with your files. There is no separate repository directory. All right, so let's create a directory to store our Source Code files. We'll create mkdir g1, then we'll put CD into there, and we'll say git init. That initializes that empty repository. We can validate it by saying git status, and it says nothing to commit, and that's all there is to creating a Git repository.
If we do git dir/a, you can see that there is a hidden directory here called .git, where all of the metadata is stored. What's important is that if you want to backup a Git repository with all the history, you backup the entire directory here with all your Source Code files, including this .git folder. So depending on the compression tool you're using, make sure that after you've made the ZipBackup or the 7zbackup that, that folder is actually in your archive. And that's it, that's all there is to creating a Git repository. Let's move on to creating some files and doing some check-ins and check-outs.
Get unlimited access to all courses for just $25/month.Become a member