Git Basics — Initialize, Stage, Commit and Inspect
In this lab, you will practice the basic Git workflow inside a simulated Linux environment.
Your task is to create a Git repository, add a file, stage your changes, create your first commit, and inspect the repository using Git commands.
Tasks
Create a directory named
my-project.Enter the directory.
Initialize a Git repository.
Create a
README.mdfile.Add some content to the README.
Check the repository status.
Stage the README file.
Create your first Git commit.
Check the repository status again.
View the commit history.
Focus on understanding the basic Git workflow:
Working directory → Staging area → Commit