Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

GitHub

GitHubΒΆ


πŸ“¦ Installation & Setup

Git install

git --version

GitHub CLI

brew install gh
gh --version

Authenticate

gh auth login
gh auth status
🌿 Branching & Commits
git checkout -b feature/my-change
git status
git add .
git commit -m "Add feature"
git push -u origin feature/my-change
πŸ”€ Pull Requests & Code Review
gh pr create --fill
gh pr list
gh pr view <number>
gh pr checkout <number>
βš™οΈ GitHub Actions (CI/CD)

Trigger and watch

gh workflow list
gh workflow run <workflow-file.yml>
gh run list
gh run view <run-id>

Minimal workflow

name: CI
on:
  push:
    branches: [main]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npm test
πŸ–₯️ GitHub CLI (gh)
gh repo create
gh repo view
gh repo clone owner/repo
gh issue list
gh issue create -t "Bug" -b "Steps to reproduce"
πŸ”‘ SSH & Authentication
ssh-keygen -t ed25519 -C "you@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
gh ssh-key add ~/.ssh/id_ed25519.pub
ssh -T git@github.com