Add gitignore and initial project files

This commit is contained in:
2026-05-29 12:46:34 +08:00
commit f9e323f70a
20 changed files with 3216 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# Git 常用命令
## 基础操作
| 命令 | 说明 |
|------|------|
| `git init` | 初始化仓库 |
| `git clone <url>` | 克隆仓库 |
| `git add .` | 暂存所有更改 |
| `git commit -m "msg"` | 提交更改 |
| `git push` | 推送到远程 |
| `git pull` | 拉取远程更新 |
## 分支管理
```bash
# 创建并切换到新分支
git checkout -b feature/new-feature
# 查看所有分支
git branch -a
# 合并分支
git merge feature/new-feature
# 删除分支
git branch -d feature/new-feature
```
## 撤销操作
- `git reset HEAD <file>` - 取消暂存
- `git checkout -- <file>` - 撤销文件修改
- `git revert <commit>` - 撤销某次提交
- `git reset --soft HEAD~1` - 撤销最近一次 commit(保留更改)