GITHUB
Explore GitHub for code hosting, project collaboration, pull
requests, and repository management.
GitHub Usage: Step-by-Step Guide
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.
Visit https://github.com and click on “Sign Up”. Provide your email, username, and password to create an account.
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
Use this command in your terminal to clone a remote GitHub repo locally.
git clone https://github.com/your-username/your-repo.git
Once changes are committed locally, push them to GitHub:
git push origin main
Used for working on new features without affecting the main branch.
git checkout -b new-feature
git push origin new-feature
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
Once the code is reviewed and approved:
- Click Merge pull request
- Confirm by clicking Confirm merge
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
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
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.,/rootor/docs) -
Click Save. Your site is live at:
https://username.github.io/repo-name
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.
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
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.)
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
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
Invite others to contribute to your repository directly.
- Go to Settings → Collaborators
- Enter GitHub username or email
- Set permissions: Read, Write, or Admin
Use organizations to manage multiple projects, teams, and permissions centrally.
- Create an org from https://github.com/organizations
- Add members and assign roles
- Manage repos and teams under the org
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
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
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
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.mdwith your bio, portfolio links, and badges
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
Used in GitHub Actions for storing sensitive data (API keys, tokens).
- Go to: Settings → Secrets → Actions
- Click New repository secret
- Add key-value pair
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
Use Markdown syntax in READMEs, issues, PRs, and comments for formatting.
**Bold**, *Italic*, `Code`, [Link](https://github.com)
- List Item
> Blockquote
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
Analyze contributions, commits, PRs, and code frequency in a repository.
- Go to the repo → Insights tab
- Check contributors, traffic, forks, commits, etc.
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
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
Comprehensive documentation for all GitHub features including repos, actions, issues, and more.
Interactive tutorials and courses to learn GitHub from beginner to advanced.
Official documentation for setting up GitHub Pages to host static websites.
Automate workflows using GitHub Actions – official guide and syntax.
https://docs.github.com/en/actions
Documentation for using GitHub CLI to manage repos, PRs, and issues from the terminal.
https://cli.github.com/manual/
Learn how to use markdown in GitHub READMEs, issues, and PRs.
https://guides.github.com/features/mastering-markdown/
Overview of GitHub Discussions for community interaction within repositories.