Objective

Learn core Git workflow: init, add, commit, log, and diff.

Tools & Technologies

  • git
  • GitHub
  • diff

Key Commands

git init
git add .
git commit -m 'feat: initial commit'
git log --oneline --graph
git diff HEAD~1

Lab Steps

01
Initialize Repository

Set up a new Git repo and configure user name and email.

02
Stage and Commit

Practice the staging area and commit workflow.

03
View History

Use git log with flags to inspect commit history.

04
Diff Tools

Compare working tree, staging area, and previous commits with diff.

Challenges Encountered

  • Committing without setting user.email and user.name
  • git add -A includes files that should be in .gitignore

Key Takeaways

  • The staging area gives you control over what goes into each commit
  • git log --oneline --graph --all shows the full branch tree