GitHub
A web-based platform for version control and collaboration using Git, allowing developers to host, review, and manage code repositories.
Overview
GitHub is the world's largest code hosting platform, built on Git version control. It provides a collaborative environment for software development with features like pull requests, issues, code review, and project management. GitHub is essential for open-source development and team collaboration.
Example
bash# Clone a repository git clone https://github.com/username/repo.git # Add remote repository git remote add origin https://github.com/username/repo.git # Push to GitHub git push origin main # Create a pull request workflow git checkout -b feature-branch git add . git commit -m "Add new feature" git push origin feature-branch # Then create PR on GitHub website # Fork workflow # 1. Fork repo on GitHub # 2. Clone your fork git clone https://github.com/your-username/repo.git # 3. Add upstream git remote add upstream https://github.com/original/repo.git # 4. Keep in sync git fetch upstream git merge upstream/main
Key Features
- Repository hosting
- Pull requests and code review
- Issues and project tracking
- GitHub Actions (CI/CD)
- GitHub Pages (static hosting)
- Collaboration tools
Key Points
- Built on Git version control
- Hosts public and private repositories
- Essential for open-source projects
- Provides CI/CD with GitHub Actions
- Integrates with many development tools
Learn More
- Git - Version control system
- npm - Package manager
- GitHub Docs