Docs Library
Git Quick Start Learning Path
A beginner-friendly Git path that covers clone, add, commit, fetch, pull, and push as a minimum usable workflow.
What this guide helps with
Many people first meet Git as a pile of commands to memorize. A better approach is to build one minimum closed loop first:
- Get the repository
- Change files
- Stage changes
- Create a commit
- Sync with the remote
Once that loop feels natural, topics like rebase, reflog, references, and the object model become much easier to learn.
The first commands to learn
1. git clone
Use it to copy a remote repository locally and record the default remote as origin.
git clone <repository-url>
2. git add
Use it to move changes from the working tree into the staging area.
git add .
3. git commit
Use it to turn the staged snapshot into a new commit.
git commit -m "feat: add login form"
4. git fetch
Use it to download new remote refs and objects without modifying your current branch directly.
git fetch origin
5. git pull
Use it to fetch first and then integrate remote changes into your current branch.
git pull --ff-only
6. git push
Use it to publish your local commits to the remote.
git push origin main
What to learn next
After this guide, the next three topics should usually be:
- The difference between
fetchandpull - The boundaries of
git rebase - Recovery with
git reflog