Grindset
LessonsPracticeStats
Foundations
  • Your First Commitinitaddcommit
  • Branching & Mergingbranchswitchmerge
Fixing Mistakes
  • Undoing Thingsrestorestashrevert
Foundations·Lesson 1

Your First Commit

initaddcommit

Every Git workflow comes down to three steps: change files, stage what you want to keep, and commit a snapshot.

git init
git status
git add <file>
git commit -m "message"
git log --oneline
Staging area
git add doesn't save anything permanently. It builds up the next commit piece by piece.

Now it's your turn

  1. Type the exact command, or pick the right answer.
Ctrl+j Next
Branching & Merging