GitHubΒΆ
π¦ Installation & Setup
Git install
git --versionGitHub CLI
brew install gh
gh --versionAuthenticate
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