Git From Scratch
Git tracks changes. GitHub and GitLab can host the remote repository.
Before you begin
Only store files you own or are licensed to place in the repository. Never commit secrets.
Basic workflow
Clone:
git clone YOUR_REPOSITORY_URL
cd YOUR_REPOSITORY
Inspect:
git status
Update from the remote:
git pull origin main
For changes you intentionally maintain:
git add .
git commit -m "Update server configuration"
git push origin main
Production rule
Do not use git add . blindly until you understand what is untracked. Run git status first.
Success check
You can clone a fresh copy, pull an update, see what changed, and restore the previous known-good version.
Document status
Last reviewed: September 2026
Version note: Use the instructions that match your installed product/resource version. When behavior differs from your release, check its release notes before changing production configuration.
