|
| 1 | +# Version Control? I Hardly Know Her... |
| 2 | + |
| 3 | +Welcome to our hands-on Git & GitHub session! This workshop will take you from zero to hero in version control. |
| 4 | + |
| 5 | +## What You'll Learn |
| 6 | + |
| 7 | +By the end of this session, you'll be able to: |
| 8 | +- Understand what version control is and why it matters |
| 9 | +- Set up Git on your machine |
| 10 | +- Create and manage repositories |
| 11 | +- Make commits like a pro |
| 12 | +- Collaborate with others using GitHub |
| 13 | +- Handle branches and merge conflicts |
| 14 | +- Use essential Git commands in your daily workflow |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +- A computer (Windows, Mac, or Linux) |
| 19 | +- Enthusiasm to learn! |
| 20 | +- No prior Git experience required |
| 21 | + |
| 22 | +## Setup Instructions |
| 23 | + |
| 24 | +### 1. Install Git |
| 25 | + |
| 26 | +**Windows:** Download from [git-scm.com](https://git-scm.com/) |
| 27 | +**Mac:** Run `git --version` in Terminal (will prompt install if needed) |
| 28 | +**Linux:** Run `sudo apt-get install git` (Ubuntu/Debian) or `sudo yum install git` (Fedora) |
| 29 | + |
| 30 | +### 2. Create a GitHub Account |
| 31 | + |
| 32 | +Sign up at [github.com](https://github.com) if you haven't already. |
| 33 | + |
| 34 | +### 3. Configure Git |
| 35 | + |
| 36 | +```bash |
| 37 | +git config --global user.name "Your Name" |
| 38 | +git config --global user.email "[email protected]" |
| 39 | +``` |
| 40 | + |
| 41 | +## Session Outline |
| 42 | + |
| 43 | +1. **Introduction to Version Control** - Why do we need this? |
| 44 | +2. **Git Basics** - Your first repository |
| 45 | +3. **GitHub Fundamentals** - Taking it online |
| 46 | +4. **Branching & Merging** - Working in parallel |
| 47 | +5. **Collaboration** - Pull requests and teamwork |
| 48 | + |
| 49 | +## Essential Commands Cheatsheet |
| 50 | + |
| 51 | +```bash |
| 52 | +# Initialize a new repository |
| 53 | +git init |
| 54 | + |
| 55 | +# Clone an existing repository |
| 56 | +git clone <url> |
| 57 | + |
| 58 | +# Check status |
| 59 | +git status |
| 60 | + |
| 61 | +# Add files to staging |
| 62 | +git add <file> |
| 63 | +git add . |
| 64 | + |
| 65 | +# Commit changes |
| 66 | +git commit -m "Your message" |
| 67 | + |
| 68 | +# Push to remote |
| 69 | +git push origin main |
| 70 | + |
| 71 | +# Pull from remote |
| 72 | +git pull origin main |
| 73 | + |
| 74 | +# Create a new branch |
| 75 | +git branch <branch-name> |
| 76 | + |
| 77 | +# Switch branches |
| 78 | +git checkout <branch-name> |
| 79 | + |
| 80 | +# Merge branches |
| 81 | +git merge <branch-name> |
| 82 | +``` |
| 83 | + |
| 84 | +## Resources |
| 85 | + |
| 86 | +- [Git Documentation](https://git-scm.com/doc) |
| 87 | +- [GitHub Guides](https://guides.github.com/) |
| 88 | +- [Interactive Git Tutorial](https://learngitbranching.js.org/) |
| 89 | +- [Git Cheat Sheet](https://education.github.com/git-cheat-sheet-education.pdf) |
| 90 | + |
| 91 | +--- |
| 92 | + |
| 93 | +*Remember: Everyone was a beginner once. Don't be afraid to make mistakes—that's what version control is for!* 😊 |
0 commit comments