帳號、Git、PR、Actions、安全 · 聯絡 psyche@mail.grokbot.com
.gitignore。開始學習吧!勾選完成的課節。
0% 完成(0/10 課節)
提示:點擊課節即可標記/取消。
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git clone https://github.com/OWNER/REPO.git
cd REPO
# 改檔後
git status
git add .
git commit -m "Describe change"
git push
.gitignore 排除 .env、node_modules/、__pycache__/git checkout -b feature/my-change
# ... commit ...
git push -u origin feature/my-change
# 在 GitHub 開 Pull Request → Review → Merge
# .github/workflows/ci.yml(概念範例)
name: ci
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "run your tests here"
學完初學 Git 後,用這套步驟把本機專案公開(或私有)上架。
.gitignore(排除 .env、金鑰、依賴目錄)。cd /path/to/your-project
git init
git add .
git status # 確認沒有 .env / 金鑰
git commit -m "Initial commit: describe your project"
git branch -M main
git remote add origin https://github.com/YOUR_USER/YOUR_REPO.git
git push -u origin main
SSH 使用者可把 remote 改成 git@github.com:YOUR_USER/YOUR_REPO.git。
# 需先安裝 gh 並 gh auth login
cd /path/to/your-project
git init && git add . && git commit -m "Initial commit"
gh repo create YOUR_REPO --public --source=. --remote=origin --push
README.md:做什麼、怎麼安裝/跑、授權。git add → commit → git push;協作改走 PR(見中階課節)。登入會員後可將整門課標記完成並同步至儀表板。