Skip to main content
  1. Learn center
  2. Software Development
  3. Guides
  4. Git tutorial
  5. Git basics
  6. Repositories
  7. Creating repositories
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

Creating repositories

There are two ways to create a local repository on your machine: you can create a new repository from scratch using a file folder on your computer or clone an existing repository.

New repositories

You can create a new repo from scratch using the git init command. It can introduce Git into an existing, unversioned project so that you can start tracking changes.

Copied repositories

You can copy a remote repository onto your local machine using the git clone command. By default, git clone will automatically set up a local main branch that tracks the remote main branch it was cloned from.

A cloned repository has the same history log as the original one. You can refer and backtrack to any commits within your local repository.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life