# Git Basics Now that you've made your first edit, let's understand what Git actually does and why it's so helpful for collaborative work. ## What is Git? Think of Git as a sophisticated "undo" system that: - **Tracks every change** to every file - **Remembers who** made each change and **when** - **Allows multiple people** to work on the same project without conflicts - **Keeps a complete history** so nothing is ever truly lost ## Key Concepts (Simplified) ### Repository ("Repo") A repository is like a project folder that Git watches. Our website is one repository. ### Commit A commit is like saving a snapshot of your work. Each commit includes: - What files were changed - Who made the changes - When the changes were made - A message describing the changes ### Branch A branch is like a parallel version of the project where you can make changes safely. Think of it as making a copy, editing the copy, then merging the good changes back to the original. ### Pull Request A pull request is like saying "Hey, I made some improvements - would you like to include them?" It's a way to propose changes and discuss them before they become part of the main project. ## The Git Workflow (What You Just Did) When you made your first edit, here's what happened: 1. **You created a branch** - A safe copy to work on 2. **You made changes** - Edited the file 3. **You committed** - Saved a snapshot with a description 4. **You created a pull request** - Asked for your changes to be reviewed 5. **Someone will review** - A team member checks your work 6. **Changes get merged** - If approved, your changes join the main project ## Why This System Works ### Safety - Multiple people can work simultaneously without breaking each other's work - Every change is tracked, so mistakes can be undone - Changes are reviewed before going live ### Transparency - Anyone can see what changed and why - The history shows how the project evolved - Credit is given to each contributor ### Collaboration - Team members can suggest improvements to your changes - Discussions happen around specific edits - Knowledge is shared through the review process ## Common Git Terms | Term | Simple Explanation | |------|-------------------| | **Clone** | Make a copy of the entire project on your computer | | **Fork** | Make your own copy of someone else's project | | **Push** | Send your changes from your computer to the server | | **Pull** | Get the latest changes from the server to your computer | | **Merge** | Combine changes from one branch into another | | **Conflict** | When two people changed the same thing - needs manual fixing | ## What's Next? Now that you understand the basics, you can either: - Continue making edits through the web interface (easiest) - Learn to [Clone and Edit Locally](local-editing.md) for more advanced work ## Video Tutorial *[Administrator: Add a video tutorial explaining Git concepts with visual examples and analogies]* ## Remember - **Git protects you** - Your changes are safe and reviewable - **Mistakes are fixable** - Nothing is ever permanently lost - **Learning takes time** - Don't worry about understanding everything at once - **Practice helps** - The more you use it, the more natural it becomes The most important thing to remember: Git is designed to help people work together safely. All the complexity exists to prevent problems and make collaboration possible.