Git and GitHub Notebook - Part 1
Master distributed version control from the ground up. Understand the core distinction between Git and GitHub, navigate the terminal filesystem, initialize repositories, track changes, stage files, and connect to remote collaboration hubs.
- What is Git? Distributed change tracking vs static file snapshots
- What is GitHub? Remote repository hosting, CI/CD, and collaboration
- Core architecture: Working Tree, Staging Area (Index), and Local Repo
- Lifecycle commands: git init, status, add, commit with meaningful messages
- Remote operations: git remote add, push, pull, and clone
# Initialize repository git init # Check working tree status git status # Stage all project files git add -A # Create descriptive atomic commit git commit -m "feat: initialize project architecture" # Set primary branch to main git branch -M main # Link to GitHub remote git remote add origin \ https://github.com/user/project.git # Push changes and set upstream tracking git push -u origin main