Your Question: How Do I Create a Local Git Repository in Ubuntu?
Contents

How do I create a local Git repository?

Start a new git repository

  1. Create a directory to contain the project.
  2. Go into the new directory.
  3. Type git init .
  4. Write some code.
  5. Type git add to add the files (see the typical use page).
  6. Type git commit .

Can you have a local Git repository?

You can clone a repository from GitHub to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub to your local machine.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest