ZANARDI Bruno

Software Developper

About
Resume

Git Blog

How To: Start a (local) repository

previous next

related commands:
clone init

Your Git is well configured, it’s time to work! There is two big ways to start a repository:

  • It’s a new project or an untracked project

Go to your project directory and just run:

$ git init

That’s it! A new repository has been created. If your project already have sources, you will have to add them.

  • The project already has a remote repository

Go to your project directory and run:

$ git clone <path/to/remote.git> .

Logically, <path/to/remote.git> is given to you by the project maintainer. With clone, you will download all current sources, so you can start ot work!

previous top next

Reminder

clone

Clones remote repository locally

$ git clone <path/to/remote.git>

init

Creates a new local repository

$ git init

Creates a new local repository in the specified directory

$ git init <directory>
previous top next