Search⌘ K
AI Features

Creating a New Project With Git

Explore how to create a new working directory, initialize a Git repository for your project, add files for tracking, and check their status. This lesson helps you understand fundamental Git commands like git init, git add, and git status to start version control effectively.

Creating a new project directory

Let’s start by creating a new working directory or folder in the terminal. We’ll call the new working directory test_project. You can create a new directory by using the following command:

mkdir test_project

Once we have created the new directory, we will need to set that as the current working directory. We will do that by entering the following command:

cd test_project

Once the test_project directory becomes the working directory, which will be initially empty, we will create a plain text file. Let’s call ...