GitHub Topics Documentation

GITHUB

Explore GitHub for code hosting, project collaboration, pull
requests, and repository management.

GitHub Usage: Step-by-Step Guide

1. What is GitHub?

GitHub is a web-based platform for version control and collaboration using Git. It allows multiple developers to work together on projects and manage code repositories in the cloud.

2. Creating a GitHub Account

Visit https://github.com and click on “Sign Up”. Provide your email, username, and password to create an account.

3. Creating a New Repository

After logging in:

  • Click the + icon on the top right → New repository
  • Fill in repository name, description (optional), choose public/private
  • Optionally add a README, .gitignore, or license
  • Click Create repository
4. Cloning a Repository

Use this command in your terminal to clone a remote GitHub repo locally.

git clone https://github.com/your-username/your-repo.git
5. Pushing Code to GitHub

Once changes are committed locally, push them to GitHub:

git push origin main
6. Creating a Branch

Used for working on new features without affecting the main branch.

git checkout -b new-feature
git push origin new-feature
7. Pull Requests (PR)

Used to propose changes from a branch to be merged into the main branch.

  • Go to the GitHub repository
  • Click Pull Requests → New Pull Request
  • Compare your feature branch with main
  • Click Create Pull Request
  • Write description and submit
8. Merging a Pull Request

Once the code is reviewed and approved:

  • Click Merge pull request
  • Confirm by clicking Confirm merge
9. GitHub Settings Overview

Click on your profile picture → Settings. You’ll find:

  • Profile: Manage bio, photo, and visibility
  • Account: Update email, username, password
  • SSH and GPG keys: Add keys for secure access
  • Notifications: Customize email and web alerts
  • Developer Settings: Access tokens, GitHub Apps, OAuth
10. Generating Personal Access Token (New SSH/HTTPS Auth)

Required for secure access instead of password:

  • Go to Settings → Developer settings → Personal Access Tokens
  • Generate new token (classic)
  • Select scopes: repo, workflow, admin:repo_hook, etc.
  • Use the token as password when prompted

GitHub Features and Collaboration Tools

11. GitHub Pages (Host a Website)

GitHub Pages lets you host static websites directly from a GitHub repository.

  • Go to the repo → Settings → Pages
  • Select a branch (usually main) and folder (e.g., /root or /docs)
  • Click Save. Your site is live at: https://username.github.io/repo-name
12. GitHub Actions (CI/CD Automation)

Automate tasks like testing and deployment using workflows.

  • Go to Actions tab
  • Select a template or create a custom workflow (.yml file in .github/workflows/)
  • GitHub will run the workflow on push, pull request, etc.
13. Creating and Managing Issues

Use issues to track bugs, tasks, and feature requests.

  • Go to Issues tab → New Issue
  • Fill in title and description
  • Assign labels, milestones, and collaborators
14. GitHub Discussions

Used for open-ended conversations and community interaction in a repo.

  • Go to Discussions tab → New Discussion
  • Select a category (Q&A, Idea, Show and Tell, etc.)
15. Forking a Repository

Forking creates a personal copy of someone else’s repo under your account.

  • Click Fork on any public repo
  • You can now clone, edit, and create PRs back to the original repo
16. Watching and Starring Repositories

Star a repo to bookmark it. Watch a repo to get notifications of activity.

  • Click on Star or Watch in the upper right corner of a repo
17. Adding Collaborators

Invite others to contribute to your repository directly.

  • Go to Settings → Collaborators
  • Enter GitHub username or email
  • Set permissions: Read, Write, or Admin
18. GitHub Organizations

Use organizations to manage multiple projects, teams, and permissions centrally.

19. Setting Repository Topics and Descriptions

Adding topics helps users find your repository by category or technology.

  • Go to the repo → click the gear/settings icon next to the description
  • Add topics like: html, nodejs, api, portfolio
20. Deleting or Archiving a Repository

Remove or freeze a repo to prevent further changes.

  • Go to Settings → Danger Zone
  • Click Delete or Archive as needed
  • You will be asked to confirm the repo name to proceed

Advanced GitHub Features and Personalization

21. Contribution Graph

Your GitHub profile displays a heatmap of your commits and activity over the past year.

  • Public activity on public repositories is tracked
  • To improve the graph, make regular commits and contributions
22. GitHub Profile README

Add a custom README to your profile by creating a repository with the same name as your username.

  • Create repo: your-username/your-username
  • Add a README.md with your bio, portfolio links, and badges
23. GitHub CLI (gh)

Use GitHub directly from your terminal using GitHub CLI.

gh repo clone owner/repo
gh issue create
gh pr list

Install from: https://cli.github.com

24. Adding Secrets (Environment Variables)

Used in GitHub Actions for storing sensitive data (API keys, tokens).

  • Go to: Settings → Secrets → Actions
  • Click New repository secret
  • Add key-value pair
25. Security Settings

Secure your account with 2FA, review devices, and manage app access.

  • Settings → Password and Authentication
  • Enable 2FA using an app like Google Authenticator
  • Revoke suspicious sessions under Sessions
26. Markdown in GitHub

Use Markdown syntax in READMEs, issues, PRs, and comments for formatting.

**Bold**, *Italic*, `Code`, [Link](https://github.com)
- List Item
> Blockquote
27. Project Boards

Manage tasks visually using Kanban-style boards.

  • Go to: Projects → New Project
  • Add cards: Issues, PRs, or notes
  • Drag and drop across columns: To Do, In Progress, Done
28. GitHub Insights

Analyze contributions, commits, PRs, and code frequency in a repository.

  • Go to the repo → Insights tab
  • Check contributors, traffic, forks, commits, etc.
29. Sponsor a Developer

GitHub Sponsors allows supporting open source developers financially.

  • Developers opt-in and set up sponsor tiers
  • Click Sponsor on a user’s profile if available
30. GitHub Codespaces

Use an instant cloud-based development environment right inside GitHub.

  • Click Code → Codespaces → Create codespace
  • VS Code runs inside your browser with full terminal access

GitHub Reference Links

1. Official GitHub Docs

Comprehensive documentation for all GitHub features including repos, actions, issues, and more.

https://docs.github.com/en

2. GitHub Learning Lab

Interactive tutorials and courses to learn GitHub from beginner to advanced.

https://lab.github.com/

3. GitHub Pages Docs

Official documentation for setting up GitHub Pages to host static websites.

https://pages.github.com/

4. GitHub Actions Docs

Automate workflows using GitHub Actions – official guide and syntax.

https://docs.github.com/en/actions

5. GitHub CLI (gh) Docs

Documentation for using GitHub CLI to manage repos, PRs, and issues from the terminal.

https://cli.github.com/manual/

6. Markdown Guide (GitHub flavored)

Learn how to use markdown in GitHub READMEs, issues, and PRs.

https://guides.github.com/features/mastering-markdown/

7. GitHub Discussions Documentation

Overview of GitHub Discussions for community interaction within repositories.

https://docs.github.com/en/discussions