KevsRobots Learning Platform
68% Percent Complete
By Kevin McAleer, 2 Minutes
Git provides a range of commands to help you manage your repositories and track changes. In this lesson, you’ll learn the essential Git commands needed to start managing your projects.
To start tracking a project with Git, navigate to the project directory and initialize a repository:
git init
After making changes to your files, you need to add them to the staging area and commit them:
git add .
git commit -m "Initial commit"
The add command stages your changes, and commit saves them to the repository with a descriptive message.
If you want to work on an existing project, you can clone its repository:
git clone https://github.com/user/repo.git
This command downloads the project and its entire history to your local machine.
In this lesson, you learned how to initialize a Git repository, add and commit changes, and clone existing repositories. These basic commands are the foundation for managing your projects with Git.
You can use the arrows ← →
on your keyboard to navigate between lessons.