GitHub is the world's largest software development platform, providing hosting for software development and version control using Git. It offers collaboration features, project management tools, and a vast ecosystem for developers.
# Create a new repository on GitHub# 1. Go to https://github.com/new# 2. Choose repository name# 3. Add description# 4. Choose public/private# 5. Initialize with README (optional)# 6. Add .gitignore and license (optional)# Clone the repository locally
gitclonehttps://github.com/username/repository-name.git
cdrepository-name
# Or create locally first
mkdirmy-project
cdmy-project
gitinit
echo"# My Project">README.md
gitaddREADME.md
gitcommit-m"Initial commit"
gitremoteaddoriginhttps://github.com/username/repository-name.git
gitpush-uoriginmain
# Multi-environment deploymentname:Deployon:push:branches:[main]jobs:deploy-staging:runs-on:ubuntu-latestenvironment:stagingsteps:-uses:actions/checkout@v4-name:Deploy to stagingrun:echo "Deploying to staging"deploy-production:runs-on:ubuntu-latestenvironment:productionneeds:deploy-stagingsteps:-uses:actions/checkout@v4-name:Deploy to productionrun:echo "Deploying to production"
# Repository Settings > Branches > Add rule# Branch name pattern: main# Require pull request reviews: ✓# Require status checks: ✓# Require branches to be up to date: ✓# Include administrators: ✓
<!-- .github/ISSUE_TEMPLATE/bug_report.md -->---
name: Bug Report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment:**-OS: [e.g. Windows 10]
-Browser [e.g. chrome, safari]
-Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
# .github/workflows/deploy.ymlname:Deploy to GitHub Pageson:push:branches:[main]permissions:contents:readpages:writeid-token:writeconcurrency:group:"pages"cancel-in-progress:falsejobs:build:runs-on:ubuntu-lateststeps:-name:Checkoutuses:actions/checkout@v4-name:Setup Pagesuses:actions/configure-pages@v4-name:Build with Jekylluses:actions/jekyll-build-pages@v1with:source:./destination:./_site-name:Upload artifactuses:actions/upload-pages-artifact@v3deploy:environment:name:github-pagesurl:${{ steps.deployment.outputs.page_url }}runs-on:ubuntu-latestneeds:buildsteps:-name:Deploy to GitHub Pagesid:deploymentuses:actions/deploy-pages@v4
GitHub Copilot is an AI-powered code completion tool that suggests code and entire functions based on context.
# Example: Copilot can suggest this functiondefcalculate_fibonacci(n):ifn<=1:returnnreturncalculate_fibonacci(n-1)+calculate_fibonacci(n-2)# Usageprint(calculate_fibonacci(10))# 55