LEARNING · VERSION CONTROL
Make your first Git commit with the free Pro Git book
Pro Git · Recording Changes to the Repository
Git saves snapshots of your files, so you can see changes and go back. The free Pro Git book on the official Git site shows how. In one sitting, set your name and start a repository for notes or code. Then check its status, stage a file and commit it.
The official Git site has the whole Pro Git book by Scott Chacon and Ben Straub. Its setup chapter shows git config --global user.name and user.email. Every commit records these. Our suggestion: install Git and set your name and email once. Make a practice folder with a README. Run git init, then git status. Next run git add README and git status again. Last, run git commit -m with a short message. Then edit the README and do it again. You will see the file move from modified to staged to committed. If you want to avoid the terminal, many code editors have Git built in. Your email is stored in every commit. So use one you are happy to make public if you share the repository later.
- The full Pro Git book is free on git-scm.com under a CC BY-NC-SA 3.0 licence
- Set user.name and user.email once with git config --global; every commit records them
- git init creates a .git subdirectory: the repository skeleton
- git add stages a file; git commit -m records the snapshot with a message
Open the Pro Git Recording Changes chapter
Source: git-scm.com · Pro Git, Recording Changes · checked 2026-11-09