Skip to main content
  1. Learn
  2. Software Development
  3. Guides
  4. Git tutorial
  5. How to use Git
  6. How to use Git on Command Line
  7. Create a local repository
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

Create a local repository

Now, let’s create a local repository and put it under the Git version control so we can use it throughout the rest of this tutorial.

You can create this new directory anywhere on your computer — just name it tutorial.

Access the directory and use the git init command to turn the new tutorial directory into a local Git repository.

$ mkdir tutorial
$ cd tutorial
$ git init
  Initialized empty Git repository in /Users/yourname/Desktop/tutorial/.git/

Now you’re ready to commit files to the repository.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life