From 5964dde3d4d00793cc74076db84182fcaf0f96ab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 18:04:09 +0000 Subject: [PATCH 1/2] Initial plan From a34c337394e584b7627ca02cbe2a95f271839cb2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 18:08:03 +0000 Subject: [PATCH 2/2] Add comprehensive learning resources for GitHub beginners Co-authored-by: rmorenosalg-design <235914305+rmorenosalg-design@users.noreply.github.com> --- CHEAT_SHEET.md | 211 +++++++++++++++++++++++++++++++++++++++++ GETTING_STARTED.md | 85 +++++++++++++++++ README.md | 22 +++++ TROUBLESHOOTING.md | 232 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 550 insertions(+) create mode 100644 CHEAT_SHEET.md create mode 100644 GETTING_STARTED.md create mode 100644 TROUBLESHOOTING.md diff --git a/CHEAT_SHEET.md b/CHEAT_SHEET.md new file mode 100644 index 0000000..f5bca8d --- /dev/null +++ b/CHEAT_SHEET.md @@ -0,0 +1,211 @@ +# GitHub Quick Reference Cheat Sheet + +A handy reference guide for common GitHub operations and commands. + +## 🌐 GitHub Web Interface + +### Creating a New Repository +1. Click the **+** icon in the top right corner +2. Select **New repository** +3. Fill in repository name and description +4. Choose public or private +5. Click **Create repository** + +### Creating a Branch +1. Click the branch dropdown (shows "main" by default) +2. Type your new branch name +3. Click **Create branch** + +### Making Changes Through Web Interface +1. Navigate to the file you want to edit +2. Click the pencil icon (✏️) to edit +3. Make your changes +4. Scroll down to the commit section +5. Add a commit message +6. Click **Commit changes** + +### Opening a Pull Request +1. Click **Pull requests** tab +2. Click **New pull request** +3. Select the branch with your changes +4. Click **Create pull request** +5. Add a title and description +6. Click **Create pull request** + +### Merging a Pull Request +1. Open the pull request +2. Review the changes +3. Click **Merge pull request** +4. Click **Confirm merge** +5. Optionally delete the branch + +## 💻 Git Command Line Basics + +### Setup and Configuration +```bash +# Set your name +git config --global user.name "Your Name" + +# Set your email +git config --global user.email "your.email@example.com" + +# Check your settings +git config --list +``` + +### Starting a Repository +```bash +# Initialize a new repository +git init + +# Clone an existing repository +git clone https://github.com/username/repository.git +``` + +### Basic Workflow +```bash +# Check status of your files +git status + +# Add files to staging area +git add filename.txt # Add specific file +git add . # Add all changed files + +# Commit your changes +git commit -m "Your commit message" + +# Push changes to GitHub +git push origin main +``` + +### Branching +```bash +# Create a new branch +git branch branch-name + +# Switch to a branch +git checkout branch-name + +# Create and switch to new branch (shortcut) +git checkout -b branch-name + +# List all branches +git branch + +# Delete a branch +git branch -d branch-name +``` + +### Updating and Syncing +```bash +# Get latest changes from GitHub +git pull origin main + +# Fetch changes without merging +git fetch origin + +# Merge a branch into current branch +git merge branch-name +``` + +### Viewing History +```bash +# View commit history +git log + +# View compact history +git log --oneline + +# View changes in files +git diff + +# View changes for a specific file +git diff filename.txt +``` + +## 🔑 Key Concepts + +### The Git Workflow +1. **Modify** files in your working directory +2. **Stage** changes you want to commit (`git add`) +3. **Commit** staged changes (`git commit`) +4. **Push** commits to GitHub (`git push`) + +### Branch Strategy +- **main/master**: The stable, production-ready code +- **feature branches**: Create these for new features or changes +- **Always branch**: Never work directly on main for new changes + +### Commit Message Best Practices +- Use present tense ("Add feature" not "Added feature") +- Keep first line under 50 characters +- Be descriptive but concise +- Example: "Fix login button alignment on mobile" + +## 📝 Common Terms + +| Term | Description | +|------|-------------| +| **Repository** | A project folder tracked by Git | +| **Clone** | Download a copy of a repository | +| **Fork** | Create your own copy of someone else's repository | +| **Commit** | Save a snapshot of your changes | +| **Push** | Upload your commits to GitHub | +| **Pull** | Download and merge changes from GitHub | +| **Branch** | A separate line of development | +| **Merge** | Combine changes from different branches | +| **Pull Request** | Propose changes to be merged | +| **Remote** | A version of your repository hosted elsewhere (like GitHub) | +| **Origin** | The default name for your remote repository | + +## 🆘 Common Issues and Solutions + +### Problem: Changes not showing on GitHub +**Solution**: Make sure you've committed AND pushed your changes +```bash +git add . +git commit -m "Your message" +git push origin main +``` + +### Problem: Merge conflict +**Solution**: +1. Open the conflicting files +2. Look for conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`) +3. Edit to keep the correct version +4. Remove the conflict markers +5. Commit the resolved files + +### Problem: Want to undo last commit (not pushed yet) +**Solution**: +```bash +git reset HEAD~1 # Keeps changes but undoes commit +``` + +### Problem: Accidentally committed to wrong branch +**Solution**: +```bash +git stash # Save your changes +git checkout correct-branch +git stash pop # Apply your changes +``` + +## 🎯 Tips for Success + +1. **Commit often**: Small, frequent commits are better than large ones +2. **Write good commit messages**: Your future self will thank you +3. **Pull before you push**: Always get the latest changes first +4. **Branch for features**: Keep your main branch clean +5. **Review before committing**: Use `git status` and `git diff` +6. **Use .gitignore**: Don't commit unnecessary files + +## 📚 Learn More + +- [GitHub Documentation](https://docs.github.com) +- [Pro Git Book](https://git-scm.com/book/en/v2) - Free and comprehensive +- [GitHub Learning Lab](https://lab.github.com) +- [Git Cheat Sheet (PDF)](https://education.github.com/git-cheat-sheet-education.pdf) + +--- + +**Remember**: Practice makes perfect! The more you use Git and GitHub, the more natural it becomes. 🚀 diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md new file mode 100644 index 0000000..526728b --- /dev/null +++ b/GETTING_STARTED.md @@ -0,0 +1,85 @@ +# Getting Started with GitHub + +Welcome! This guide will help you understand the basics of GitHub and get you started on your learning journey. + +## What is GitHub? + +GitHub is a web-based platform where developers store, share, and collaborate on code. Think of it as a social network for programmers, where you can: +- Store your code projects +- Track changes to your code over time +- Collaborate with others +- Share your work with the world + +## Key Concepts for Beginners + +### 1. **Repository (Repo)** +A repository is like a folder for your project. It contains all your project files and the history of changes made to them. + +### 2. **Git** +Git is the version control system that powers GitHub. It helps you track changes to your files over time. + +### 3. **Commit** +A commit is like a snapshot of your project at a specific point in time. Think of it as saving your progress in a video game. + +### 4. **Branch** +A branch is a separate version of your repository. You can make changes on a branch without affecting the main version of your project. + +### 5. **Pull Request (PR)** +A pull request is how you propose changes to a project. It's like saying "Hey, I made some improvements. Would you like to include them?" + +### 6. **Merge** +Merging is when you combine changes from one branch into another, usually from your working branch into the main branch. + +## Your First Steps on GitHub + +If you're new to GitHub, here's what you should do: + +1. **Create a GitHub Account**: Go to [github.com](https://github.com) and sign up +2. **Complete This Course**: This repository is an interactive course that will teach you the basics +3. **Follow the README**: The main README.md file has step-by-step instructions +4. **Practice**: The best way to learn is by doing! + +## How This Course Works + +This repository uses GitHub Actions to automatically guide you through the learning process: + +1. You'll start by creating a branch +2. Then you'll make a commit +3. Next, you'll open a pull request +4. Finally, you'll merge your changes + +Each step builds on the previous one, and the repository will automatically update with new instructions as you progress. + +## Common GitHub Terms + +| Term | Definition | +|------|------------| +| **Fork** | Creating your own copy of someone else's repository | +| **Clone** | Downloading a repository to your computer | +| **Push** | Sending your changes to GitHub | +| **Pull** | Getting the latest changes from GitHub | +| **Main/Master** | The primary branch of a repository | +| **README** | A file that explains what your project is about | + +## Tips for Success + +✅ **Read carefully**: Each step has detailed instructions +✅ **Take your time**: There's no rush - learn at your own pace +✅ **Ask questions**: If you're stuck, check GitHub's documentation or community forums +✅ **Practice regularly**: The more you use GitHub, the more comfortable you'll become +✅ **Don't be afraid to experiment**: You can't really break anything in your own repositories + +## Helpful Resources + +- [GitHub Docs](https://docs.github.com): Official GitHub documentation +- [Git Handbook](https://guides.github.com/introduction/git-handbook/): Introduction to Git +- [GitHub Learning Lab](https://lab.github.com): More interactive courses +- [GitHub Community](https://github.community): Ask questions and get help + +## Ready to Start? + +Head back to the main [README.md](README.md) file to begin your GitHub learning journey! + +--- + +**Remember**: Everyone was a beginner once. Take it one step at a time, and you'll be comfortable with GitHub in no time! 🚀 diff --git a/README.md b/README.md index 79ea84f..4a8a018 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,15 @@ _Get started using GitHub in less than an hour._ +## 📖 Quick Navigation + +**New to GitHub?** Start here: +- 📘 [Getting Started Guide](GETTING_STARTED.md) - Learn the basics and key concepts +- 📋 [Quick Reference Cheat Sheet](CHEAT_SHEET.md) - Handy commands and operations +- 🔧 [Troubleshooting Guide](TROUBLESHOOTING.md) - Solutions to common problems + +**Ready to learn?** Follow the course below! +