Starting and checking
init begins tracking. status tells you what git currently believes and what to do next.
git init
git status
git log
git log --oneline- Run status before adding, after adding, and before committing.
Development tools reference
A reference for tracking work, branching, and publishing a repository.
A change moves through three places: your working directory, the staging area, then the repository.
init begins tracking. status tells you what git currently believes and what to do next.
git init
git status
git log
git log --onelineStaging lets you record some changes and not others, which is what makes a history worth reading.
git add file.txt
git add .
git restore --staged file.txt # unstage, keeping edits
git commit -m "Fix navigation on mobile"diff shows what is different right now, before you stage it.
git diff # unstaged changes
git diff --staged # what is about to be committedA separate line of history, so you can try something without risking what already works.
git branch
git switch -c add-contact # create and move
git switch main
git merge add-contactGit asking which version is right, because the same lines changed on both branches.
<<<<<<< HEAD
your current branch
=======
what is coming in
>>>>>>> other-branchA copy of your repository somewhere else. origin is a conventional name, not a keyword.
git remote add origin https://github.com/you/repo.git
git remote -v
git push -u origin main
git pull
git clone https://github.com/you/repo.gitPatterns git should pretend it cannot see.
node_modules/
.venv/
dist/
.DS_Store
*.log
.envA reference tells you what exists. The course teaches you when to reach for it, and has you build something real while you learn.