Github-for-beginners

Welcome to the GitHub for Beginners practice repository! This repo is designed to help you learn and practice essential GitHub workflows including forking, cloning, branching, committing, pushing, and creating pull requests.

N

nisalgunawardhana

Dernière activité 27 sept. 2026
nisalgunawardhana/Github-for-beginners

576

étoiles

1 k

forks

32

issues ouvertes

gitgit-addgit-commitgithubgithub-for-beginnersgithub101learnpull-request

Ce README est souvent en anglais.

🚀 GitHub 101 - GitHub For Beginners

Welcome to the GitHub for Beginners practice repository! This repo is designed to help you learn and practice essential GitHub workflows including forking, cloning, branching, committing, pushing, and creating pull requests.

GitHub for Beginners banner

Follow me on GitHub Star this repo

📋 What You'll Learn

  • ✅ Fork a repository
  • ✅ Clone a repository to your local machine
  • ✅ Create and switch between branches
  • ✅ Make changes to files
  • ✅ Stage and commit changes
  • ✅ Push changes to GitHub
  • ✅ Create Pull Requests
  • ✅ Work with Issues
  • ✅ Basic Git commands and GitHub workflow

Prerequisites

Before you begin, make sure you have the following installed. For detailed installation instructions, see Prerequisites – GitHub 101 (For Beginners).pdf

1. Install Git

For Windows:

  1. Download Git from git-scm.com
  2. Run the installer and follow the setup wizard
  3. Use the default settings (recommended for beginners)
  4. Verify installation by opening Command Prompt or PowerShell:
    git --version

For Mac:

  1. Install via Homebrew (recommended):
    brew install git
    Or download from git-scm.com
  2. Verify installation in Terminal:
    git --version

2. Install Visual Studio Code

  1. Download VS Code from code.visualstudio.com
  2. Install the application for your operating system
  3. Install the VS Code command line tool to open projects from terminal

Instruction Videos

Language Video Status
Sinhala Watch Tutorial ✅ Available
English Watch Tutorial ✅ Available

Getting Started

Step 1: Fork This Repository

  1. Click the "Fork" button at the top right of this repository
  2. This creates a copy of the repository in your GitHub account For detailed steps, see How to Fork a Repository

💡 Best Practice: Create a dedicated folder on your Desktop called workshop for this project.

After creating the folder, open your terminal/command prompt from that location before cloning the repository.

For Windows users: Follow these detailed instructions: Windows Command Prompt Setup

Step 2: Clone Your Fork

# Replace 'your-username' with your actual GitHub username
git clone https://github.com/your-username/Github-for-beginners.git

# Navigate to the project directory
cd Github-for-beginners

💡 Tip: To open the project in VS Code from your terminal, run:

code .

Make sure you have the VS Code command line tool installed.

Branch Practice Exercises

Exercise 1: Create Your First Branch

# Create and switch to a new branch with your name
git checkout -b feature/your-name-introduction

# Or alternatively
git branch feature/your-name-introduction
git checkout feature/your-name-introduction

Exercise 2: Make Your First Changes

  1. Open the student-introductions.md file
  2. Add your introduction following the template
  3. Save the file

Exercise 3: Stage and Commit Changes

# Check what files have changed
git status

# Add your changes to staging
git add student-introductions.md

# Or add all changes
git add .

# Commit your changes with a descriptive message
git commit -m "Add introduction for [Your Name]"

⚠️ Note: If you encounter issues like Git not recognizing your name or email during commits, this can prevent you from committing changes.
You can troubleshoot and fix it by following the steps in the support file:
Git-Configuration-Troubleshooting.md

Exercise 4: Push Your Branch

# Push your branch to your fork
git push origin feature/your-name-introduction

Exercise 5: Create a Pull Request

  1. Go to your fork on GitHub
  2. You'll see a prompt to create a Pull Request
  3. Click "Compare & pull request"
  4. Add a title and description
  5. Click "Create pull request"

GitHub for Beginners banner

GitHub for Beginners banner

GitHub for Beginners banner

🏆 Submission Guidelines

When you complete the exercises:

  1. Move to the main repository (original one) by switching your remote to the upstream/main repo if needed.
  2. Create an issue on that branch using the "Submission" template.
  3. Include the following information:
    • Your GitHub username
    • Links to your pull requests
    • Screenshot of your contribution
    • Brief reflection on what you learned

GitHub for Beginners banner

GitHub for Beginners banner

📋 Checklist for Completion

  • Successfully forked the repository
  • Cloned to local machine
  • Created at least 2 different branches
  • Made commits with good commit messages
  • Pushed branches to GitHub
  • Created at least 1 pull request
  • Created at least 1 issue on the main repository
  • Added your introduction to the student introductions file

🐛 Working with Issues

Creating an Issue

  1. Go to the Issues tab
  2. Click "New issue"
  3. Choose from our templates:
    • Bug Report
    • Feature Request
    • Question
    • Submission

Issue Best Practices

  • Use descriptive titles
  • Provide detailed descriptions
  • Add relevant labels
  • Reference related issues or PRs using #number

🔄 Common Git Commands Reference

Basic Commands

# Check repository status
git status

# View commit history
git log --oneline

# Check current branch
git branch

# Switch branches
git checkout branch-name

# Create and switch to new branch
git checkout -b new-branch-name

# Delete a branch
git branch -d branch-name

Working with Changes

# Add specific files
git add filename.txt

# Add all changes
git add .

# Commit with message
git commit -m "Your commit message"

# Add and commit in one step
git commit -am "Your commit message"

Synchronizing with Remote

# Push changes
git push origin branch-name

# Pull latest changes
git pull origin main

# Fetch updates without merging
git fetch upstream

🤝 Contributing

This is a learning repository, and contributions are welcome! If you have suggestions for improvement:

  1. Create an issue to discuss your idea
  2. Fork the repository
  3. Create a feature branch
  4. Make your changes
  5. Submit a pull request

📚 Additional Resources

📞 Need Help?

  • Create an issue with the "Question" template
  • Check existing issues for similar questions
  • Review the documentation links above

⚖️ License

This project is licensed under the MIT License - see the LICENSE file for details.


🌐 Connect with Me

Follow me on social media for updates and more learning resources:

Twitter LinkedIn Instagram

Happy Learning! 🎉

Remember: Making mistakes is part of learning. Don't be afraid to experiment and try new things!

Projets similaires

A step-by-step guide to getting started with Git and GitHub for beginners.

awesomegitgit-cheatsheet
Ddrshahizan
923 étoiles680

Make your first GitHub pull request. A free, beginner-friendly Git tutorial and contribution practice project.

JavaScriptawesomeawesome-listbeginner-friendly
Rrishabh-bansal
499 étoiles2,6 k

🚀✨ Help beginners to contribute to open source projects

beginnerbeginner-friendlycontribute
Ffirstcontributions
56,1 k étoiles110,1 k