⚡ Git 设置快速指南
🚀 5 分钟快速设置
1️⃣ 初始化 Git 仓库
1 2 3 4
| cd todolist-app git init git add . git commit -m "Initial commit: TodoList app"
|
2️⃣ 在 GitHub 创建仓库
- 访问 https://github.com/new
- 填写仓库名:
todolist-app
- 选择 Public
- 不要勾选任何初始化选项
- 点击 Create repository
3️⃣ 连接并推送
1 2 3 4
| git remote add origin git@github.com:username/todolist-app.git git branch -M main git push -u origin main
|
4️⃣ 配置 SSH(如果还没有)
1 2 3 4 5 6 7 8 9 10
| ls ~/.ssh/id_rsa.pub
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
cat ~/.ssh/id_rsa.pub
|
5️⃣ 部署到 GitHub Pages
完成! ✅
访问:https://username.github.io/todolist-app
📝 完整文档
详细说明请查看:GIT_SETUP.md