3.1 Creating a Repository
Creating a repository in Git is simple, but it seems peculiar if you’re coming
from Subversion or CVS. Your repository is something that exists separate from your
copy of it in most VCSs. Your repository in Git is
stored right alongside your working tree in a directory called
.git.
To create a repository in Git, you first need to decide where you want to
store your project’s code. In this example, we’re going to create a simple HTML
page, so let’s call our project mysite. You need to
create a directory of the same name; then
change into it, and type git init.
The whole process should look something like this:
|
prompt> mkdir mysite |
|
|
prompt> cd mysite |
|
|
prompt> git init |
|
|
|