Git — GitHub
What is GitHub?
A web-based platform for version control and collaboration.
Create Repository
- Click "New repository"
- Name your repo
- Choose public/private
- Create repository
Push to GitHub
git remote add origin https://github.com/user/repo.git
git push -u origin main
Clone from GitHub
git clone https://github.com/user/repo.git
Pull Requests
- Create branch
- Make changes
- Push branch
- Create pull request
- Review and merge
GitHub Features
| Feature | Description |
|---|---|
| Issues | Track bugs and features |
| Actions | CI/CD automation |
| Pages | Host static sites |
| Projects | Project management |
| Packages | Package hosting |
SSH Setup
# Generate key
ssh-keygen -t ed25519 -C "your@email.com"
# Add to agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
# Copy to GitHub
cat ~/.ssh/id_ed25519.pub
Mini Practice
- Create GitHub repo
- Push code
- Create pull request
- Set up SSH
Up Next
Continue with GitLab — GitLab platform.
Related Topics
Frequently Asked Questions about GitHub
What is GitHub in Git?
GitHub is a fundamental concept in Git. This lesson explains it step by step with clear examples, making it easy for beginners to understand.
How do I learn GitHub?
Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn GitHub.
Why is GitHub important in Git?
GitHub is essential for Git development. Understanding this concept will help you write better code and solve real-world problems more effectively.