Git keeps a history of your code so you can experiment without fear. You only need a few commands to start.
Start a project
# create a new repository in the current folder
git init
# see which files changed
git statusSave your work
# stage the files you want to save
git add index.html style.css
# save a snapshot with a message
git commit -m "Add home page layout"Try ideas on a branch
# create a branch and switch to it
git switch -c new-header
# go back to the main branch
git switch mainShare with GitHub
git remote add origin https://github.com/your-name/your-repo.git
git push -u origin mainCommit small and often. A clear message like
Fix mobile menuis easier to find later thanupdate.
Ready to go further? Our courses use Git in every project.




