Git Add vs Commit — Understanding the Staging Area
Small Lessons, Big Skills
0:00 / 0:00
Git Add vs Commit — Understanding the Staging Area
6 просмотров · 10 дн. назад
Small Lessons, Big Skills
4 подписчика
6 просмотров · 10 дн. назад
You staged a file, edited it again, then committed. Which version did Git save?
Learn Git's working tree, staging area (index), and commits through real terminal examples. See why a file can be both staged and unstaged, how to select specific files, and how to inspect exactly what your next commit will contain.
In this beginner lesson:
• git status and its two short-status columns
• git diff versus git diff --staged
• git add with explicit paths
• normal commits and the staged snapshot
• git show and git log
• two prediction exercises with verified answers
Commands use Git Bash on Windows or Bash on macOS/Linux. Sample identity is fictional. All examples are local; no GitHub upload or remote is involved. Commit hashes will differ in your own lab.
#git #gittutorial #learngit