Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026
The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.
Let’s see how a file can be added to Git. Type:
echo "Test" > README.txt
to create a file. The file is now in the directory, but Git was not told to add it to its index, as you can see what git status tells us:

Now we need to add the file to the repository with:
git add README.txt
This command adds the file to the staging area:

Once a file is in the staging area, you can remove it by typing:
git reset README.txt
But usually what you do once you add a file is commit it.
Once you have one or more changes to the staging area, you can commit them using
git commit -am "Description of the change"

This cleans the status of the staging area:

and permanently stores the edit you made into a record store, which you can inspect by typing git log:
