01. GitHub Setup and Repositories
Level: Beginner
- Create GitHub account and profile
- Create your first repository
- Set up secure SSH authentication
- Clone repositories to your machine
- Push and pull code with GitHub
- Collaborate with team members
The Problem
Git runs locally on your machine. GitHub is where your code lives in the cloud, shared with your team. Every professional .NET project is on GitHub (or GitLab/Bitbucket). You need to know how to set it up, push code, and handle pull requests.
Create GitHub Account
Visit: https://github.com
Sign up with your email and create username
Create Repository
- Click + → New repository
- Name:
SMS(SchoolManagementSystem) - Description: "School Management System project"
- Public (open source) or Private (team only)
- Add .gitignore: Select C#
- Add license: MIT
- Click Create
SSH Keys Setup
Generate SSH key (secure authentication):
ssh-keygen -t ed25519 -C "email@example.com"
# Saves to ~/.ssh/id_ed25519
Copy public key:
cat ~/.ssh/id_ed25519.pub
# Copy entire output
GitHub Settings → SSH keys → Add SSH key → Paste
Verify:
ssh -T git@github.com
# Hi TeamSahasra! You've successfully authenticated.
Clone Repository
# With HTTPS (password prompt each time)
git clone https://github.com/TeamSahasra/SMS.git
# With SSH (no password)
git clone git@github.com:TeamSahasra/SMS.git
cd SMS
Repository Structure
SMS on GitHub:
GitHub: TeamSahasra/SMS
├── README.md
├── .gitignore
├── LICENSE
├── src/
│ ├── SMS.Core/
│ ├── SMS.Data/
│ └── SMS.Api/
├── tests/
│ └── SMS.Tests/
└── docs/
README.md
Project documentation:
# School Management System (SMS)
Simple SMS for school operations.
## Features
- Student management
- Exam tracking
- Fee management
- Attendance
## Setup
1. Clone: `git clone ...`
2. Build: `dotnet build`
3. Run: `dotnet run`
## Tech Stack
- ASP.NET Core Web API
- SQL Server
- Entity Framework Core
## Team
- TeamSahasra
Good README = attracts contributors.
Key Takeaways
- GitHub = cloud repository
- SSH = secure authentication
- README = project documentation
- .gitignore = exclude files
Write comprehensive README. First impression for contributors.
Use ChatGPT, Claude, or Copilot to go deeper on GitHub Setup. Try these prompts:
"How do I create a GitHub repository?""Why use SSH keys?""What should be in README?""Quiz me on GitHub"
💡 Tip: After reading this article, paste your own code into AI and ask "What could go wrong here and why?" — fastest way to find edge cases and deepen understanding.