šŸŽ“
1 / 8

101 — Create Your First Git Repository

Learn the fundamentals of Git by creating your first repository, tracking files, and making commits on your local machine.

Learning Objectives

1
Initialize a Git repository
2
Understand the staging area
3
Create meaningful commits
4
View commit history
Step 1

Create a workspace directory

Start by creating a clean directory for this lesson. This keeps your practice organized and separate from other projects.

Commands to Run

mkdir -p ~/git-practice/lesson-101
cd ~/git-practice/lesson-101

What This Does

The `mkdir -p` command creates a directory and any necessary parent directories. The `cd` command changes your current directory to the newly created folder.

Expected Outcome

You should now be in the `git-practice/lesson-101` directory. You can verify this by running `pwd` (print working directory).

Pro Tips

  • 1
    Use `pwd` to confirm you're in the right directory
  • 2
    The `-p` flag prevents errors if the parent directory already exists

All Steps (0 / 8 completed)