Introduction to GitHub - bounswe/bounswe2025group2 GitHub Wiki

Introduction to GitHub

What is GitHub?

GitHub is a cloud-based platform that facilitates version control and collaborative software development. It is built on Git, an open-source version control system that allows multiple developers to track and manage changes in their codebase. GitHub enhances Git by providing an intuitive web interface, powerful collaboration tools, and integrations with various development workflows.

History and Origin

GitHub was founded in 2008 by Tom Preston-Werner, Chris Wanstrath, Scott Chacon, and P. J. Hyett as a way to simplify code sharing and collaboration using Git. Before GitHub, developers had to rely on complex command-line operations or self-hosted repositories to manage projects.

Key Milestones:

  • 2008 - GitHub was launched.
  • 2010 - GitHub reached 1 million repositories.
  • 2018 - Microsoft acquired GitHub for $7.5 billion.
  • 2020 - GitHub introduced GitHub Codespaces, a cloud-based development environment.
  • 2023 - GitHub Copilot, an AI-powered coding assistant, became widely available.

Aim of GitHub

GitHub aims to provide a seamless and efficient platform for developers to:

  • Host and manage code repositories.
  • Track and review changes using pull requests and issues.
  • Facilitate open-source contributions.
  • Automate software development workflows using GitHub Actions.
  • Enhance collaboration among developers worldwide.

Why Use GitHub?

GitHub is widely used for:

  • Open-source projects (e.g., [Linux], [TensorFlow], [React]).
  • Enterprise software development with private repositories.
  • Collaborative coding among teams worldwide.
  • Learning and showcasing projects with an online portfolio.

Conclusion

GitHub has revolutionized software development by making version control and collaboration more accessible. Whether for individual projects, team collaboration, or large-scale enterprise development, GitHub remains a vital tool for developers and organizations worldwide.

🚀 Start exploring GitHub today! [Sign up here]

Repo Tabs

Code

The Code tab in a GitHub repository is the central place where all the project files, folders, and version history are displayed. It provides essential tools for browsing, cloning, and contrbuting to the repository. This introdction breaks down each section of the Code tab and provides useful resources for further learning.


🔹 1. Repository Header

What It Contains:
  • Repository name (Format: owner/repository-name)
  • Star: Save the repo for easy access.
  • Fork: Copy the repo to your account.
  • Watch: Get notifications about changes.
Resources:

🔹 2. Branch Selector & Tags

What It Contains:
  • Branch selector: Switch between different branches.
  • Tags: Mark important points in the repo (e.g., v1.0).
Resources:

🔹 3. File & Folder List

What It Contains:
  • Displays the main content of the repository.
  • Clicking a file opens it for viewing; clicking a folder navigates inside it.
  • Shows the last commit message for each file.
Resources:

🔹 4. README File

What It Contains:
  • Typically written in Markdown (.md).
  • Provides project details: description, setup, usage, and contribution guidelines.
Resources:

🔹 5. Clone & Download Section

What It Contains:
  • A green "Code" button with options to:
    • Clone via HTTPS, SSH, or GitHub CLI.
    • Download ZIP to get the repo as a compressed file.
Resources:

🔹 6. Latest Commit & History

What It Contains:
  • Shows the latest commit that modified the repository.
  • Clicking the commit hash (e.g., f4a7c9d) opens the commit details.
  • "History" link leads to the full commit history.
Resources:

🔹 7. Contributors & Insights

What It Contains:
  • Displays the list of contributors.
  • "Insights" tab shows contributions, commits, and pull requests statistics.
Resources:

🔹 8. License (If Present)

What It Contains:
  • Specifies the legal terms for using the project (e.g., MIT, Apache, GPL).
  • Encourages open-source contribution with clear usage rights.
Resources:

Issues

The Issues tab in a GitHub repository is a powerful tool for tracking bugs, feature requests, and general project discussions. It enables developers to collaborate, assign tasks, and manage project progress efficiently. This introduction explains each section of the Issues tab and provides useful resources for further exploration.


🔹 1. Issues Overview

What It Contains:
  • Displays a list of all open and closed issues.
  • Issues are categorized into Open (active) and Closed (resolved or discarded).
  • Each issue has a title, status, and labels.
Resources:

🔹 2. Creating a New Issue

What It Contains:
  • A "New Issue" button to create a new issue.
  • Fields include:
    • Title: A brief description of the issue.
    • Description: Detailed information, including screenshots, code snippets, and references.
    • Labels: Categorize the issue (e.g., bug, enhancement).
    • Assignees: Assign specific team members.
    • Projects & Milestones: Link to larger project goals.
Resources:

🔹 3. Labels & Filters

What It Contains:
  • Labels: Colorcoded tags to classify issues (e.g., bug, documentation).
  • Filters: Search for issues based on labels, status, or author.
  • Common filters:
    • is:open is:issue: Shows all open issues.
    • author:@username: Displays issues created by a specific user.
    • label:bug: Filters issues labeled as bugs.
Resources:

🔹 4. Issue Discussions & Comments

What It Contains:
  • Each issue hasa discussion thread where users can:
    • Comment and provide feedback.
    • Attach files and images.
    • Mention team members using @username.
  • Issue authors and maintainers can:
    • Close an issue when resolved.
    • Lock discussions if needed.

🔹 5. Assigning & Managing Issues

What It Contains:

  • Assign issues to team members for responsibility tracking.
  • Link issues to pull requests (PRs) for tracking fixes.
  • Use Projects & Milestones to organize work.
Resources:

🔹 6. Closing & Reopening Issues

What It Contains:
  • Issues can be closed manually or automatically via pull requests (e.g., Fixes #123).
  • Closed issues can be reopened if needed.
Resources:

Pull Requests

A Pull Request (PR) is a way to propose changes to a codebase. It allows developers to review, discuss, and merge changes into the main branch while keeping track of version history.

Key Features of Pull Requests

  • Branch Comparison: Compares changes between branches before merging.
  • Code Review: Team members can leave comments and suggest improvements.
  • Automated Checks: Integrates with CI/CD pipelines to run tests before merging.
  • Merge Strategies: Supports squash merge, rebase, and regular merge.

Example Workflow for Creating a PR

  • Create a new branch and make changes.
  • Push the branch to the remote repository.
  • Open a Pull Request from GitHub UI.
  • Request reviews from team members.
  • Resolve comments and make necessary changes.
  • Merge the PR once approved.

Example PR Structure in Markdown:

## Feature: Add User Authentication
### Summary
This pull request adds user authentication using JWT.

### Changes Made
- Implemented login & registration APIs.
- Added password hashing for security.
- Included unit tests for authentication.

### Checklist
- [x] Code follows style guidelines.
- [x] Tests pass successfully.
- [x] Documentation updated.

Discussions

The Discussions tab in GitHub allows developers, contributors, and community members to engage in conversations, brainstorming, and feedback without affecting the codebase. It serves as a forum-like space where users can discuss ideas, ask questions, and collaborate.

Why Use GitHub Discussions?

  • Feature Requests – Suggest and discuss new features before implementation.
  • Bug Reports – Report issues that may not require an immediate fix.
  • Help & Support – Ask for guidance and troubleshooting assistance.
  • Announcements – Share updates, major changes, and upcoming releases.
  • Community Engagement – Encourage contributors to participate in decision-making.

Categories in GitHub Discussions

Discussions are categorized to organize topics and improve accessibility:

  • General – Open-ended conversations related to the project.
  • Ideas – Propose new features and get feedback.
  • Q&A – Ask and answer technical questions.
  • Show and Tell – Share use cases, success stories, or custom implementations.

Example Discussion Post

Title: Should We Add Dark Mode?
Body:
Many users prefer a dark theme for better readability at night. Would it be beneficial to add a dark mode toggle? Let’s discuss possible implementations and UI choices!

Tags: feature-request, ui/ux


Best Practices for Discussions

  • Be clear and concise – Describe your question or idea in detail.
  • Use labels – Tags help categorize discussions effectively.
  • Be respectful – Maintain a professional and constructive tone.
  • Search before posting – Avoid duplicate discussions on the same topic.
  • Follow up – If a discussion leads to a solution, summarize it for others.

Additional Resources

Actions

the GitHub Actions is a powerful automation tool that lets you define workflows for various tasks in your repository, i lets you write YAML files to automatically perform tasks on your repository, whenever some specified set of events happen, the tasks you can perform include:

  • Automated Code testing
  • Auto Deployment of you code to some given instance
  • Code Formatting and Linting
  • Automatic release management

an example YAML file for automated testing would look like:

name: Run Python Tests # name of workflow
on: [push, pull_request] # specified events that'll trigger this workflow

jobs:
  test:
    runs-on: ubuntu-latest
    steps: # steps to perform this workflow
      - name: Checkout code #checkout code
        uses: actions/checkout@v3

      - name: Set up Python # set up python
        uses: actions/setup-python@v4
        with:
          python-version: '3.10'

      - name: Install dependencies # install dependencies
        run: |
          pip install -r requirements.txt

      - name: Run tests # run tests
        run: pytest

Projects

A project is an adaptable spreadsheet, task-board, and road map that integrates with your issues and pull requests on GitHub to help you plan and track your work effectively. You can create and customize multiple views by filtering, sorting, grouping your issues and pull requests, visualize work with configurable charts, and add custom fields to track metadata specific to your team. Rather than enforcing a specific methodology, a project provides flexible features you can customize to your team’s needs and processes.


🔹 1. Overview of GitHub Projects

What It Contains:
  • A Kanban-style board to manage tasks visually.
  • Columns for organizing work (e.g., To Do, In Progress, Done).
  • Supports both classic project boards and newer GitHub Projects with enhanced automation.
Resources:

🔹 2. Creating a Project

What It Contains:
  • The "New Project" button to create a board.
  • Options to:
    • Name the project.
    • Choose between Table or Board views.
    • Add a description for clarity.
Resources:

🔹 3. Managing Tasks

What It Contains:
  • Add Issues & PRs: Link tasks from the repository.
  • Custom Fields: Add priroity levels, deadlines, and more.
  • Automation: Move tasks between columns based on status.
Resources:

🔹 4. Collaboration & Permissions

What It Contains:
  • Assign team members to tasks.
  • Define roles and permissions for contributors.
  • Comment and discuss directly within project items.
Resources:

Wiki

the GitHub Wiki is a built-in documentation system that allows users to create structured documentations for their repositories , unlike the Readme.md files under the main code part of the repository, the wiki pages are kept under a seperate Git repository the main supported file format in Wiki is markdown, (.md) but you can also embed elements inside of it such as HTML or use directly txt, XML etc. instead (they won't be rendered by GitHub, but you can still upload these). the main use cases for GitHub wiki include:

  • Project Documentation
  • API Documentation
  • Release Notes & Changelogs
  • Usage Guidelines & Best Practices

with that being said the GitHub wiki can also be used for other purposes as well, such as creating Open Source Contribution Guides, or to create an internal knowledge base for software teams etc.

Security

the GitHub security is a tool provide some ways to save the repository from security vulnerabilities, these include:

  • static analysis: Automatically scans your code for security vulnerabilities and coding errors.
  • secret scanning: Detects hardcoded API keys, passwords, and tokens in your repository.
  • Dependency Graph & Vulnerability Alerts: Monitors project dependencies for security vulnerabilities.
  • Dependabot: Keeps dependencies up to date by opening automatic pull requests for security patches.

it aims to provide security for users' and maintainers' critical informations that rely on security of the code

Insights

The Insights tab in GitHub provides valuable analytics and data about a repository's contributions, traffic, dependencies, and community activity. It helps maintainers track project health, contributor engagement, and potential security issues.


🔍 Key Features of Insights

1️⃣ Contributors

  • Displays a list of active contributors along with their commit history.
  • Shows lines of code added and removed over time.
  • Helps recognize top contributors and track project growth.

2️⃣ Community

  • Highlights repository best practices, such as:
    • Presence of a README.md
    • Issue templates
    • Contribution guidelines (CONTRIBUTING.md)
    • License file (LICENSE)
  • Ensures the repository follows open-source standards.

3️⃣ Traffic

  • Provides insights into repository visitors and clone activity:
    • Unique visitors per day/week.
    • Total page views over time.
    • Top referring sites (where traffic is coming from).
  • Helps understand repository visibility and audience.

4️⃣ Commits & Code Frequency

  • Displays commit activity over weeks/months.
  • Shows how frequently code is being updated.
  • Helps in analyzing development trends.

5️⃣ Dependency Graph

  • Lists all project dependencies and their versions.
  • Identifies security vulnerabilities in dependencies.
  • Works with GitHub Dependabot to provide automatic updates and security patches.

6️⃣ Forks & Network

  • Displays the number of forks and how they evolve.
  • Helps track contributions from forks.
  • Useful for open-source projects to monitor adoption.

Settings

The GitHub settings provides some basic options & settings, from this tab, you can change

  • whether the repo is private or public
  • whether ceratin git operations (force push for example) are allowed in this repository