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:

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.

8. Merging a Pull Request

Once the code is reviewed and approved:

9. GitHub Settings Overview

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

10. Generating Personal Access Token (New SSH/HTTPS Auth)

Required for secure access instead of password:

GitHub Features and Collaboration Tools

11. GitHub Pages (Host a Website)

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

12. GitHub Actions (CI/CD Automation)

Automate tasks like testing and deployment using workflows.

13. Creating and Managing Issues

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

14. GitHub Discussions

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

15. Forking a Repository

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

16. Watching and Starring Repositories

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

17. Adding Collaborators

Invite others to contribute to your repository directly.

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.

20. Deleting or Archiving a Repository

Remove or freeze a repo to prevent further changes.

Advanced GitHub Features and Personalization

21. Contribution Graph

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

22. GitHub Profile README

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

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).

25. Security Settings

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

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.

28. GitHub Insights

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

29. Sponsor a Developer

GitHub Sponsors allows supporting open source developers financially.

30. GitHub Codespaces

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

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