Git Fundamentals
Objective
Learn core Git workflow: init, add, commit, log, and diff.
Tools & Technologies
gitGitHubdiff
Key Commands
git initgit add .git commit -m 'feat: initial commit'git log --oneline --graphgit diff HEAD~1Lab 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