Add initial project files including .gitattributes, .gitignore, and configuration for Obsidian
This commit is contained in:
76
notes/git.md
Normal file
76
notes/git.md
Normal file
@@ -0,0 +1,76 @@
|
||||
## 从自己的分支开始
|
||||
|
||||
1. 拉取分支
|
||||
|
||||
```bash
|
||||
git clone [repo.git]
|
||||
cd [repo-name]
|
||||
```
|
||||
|
||||
2. 创建自己的分支
|
||||
|
||||
```bash
|
||||
git checkout -b [your-name]/[do-something] # 比如 manan/dev
|
||||
```
|
||||
|
||||
3. 首次推送分支到远程
|
||||
|
||||
```bash
|
||||
git push -u origin [branch-name]
|
||||
```
|
||||
|
||||
4. 本地一些改动
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m [message]
|
||||
```
|
||||
|
||||
5. 推送改动
|
||||
|
||||
```bash
|
||||
git push
|
||||
```
|
||||
|
||||
## 合并到`main`
|
||||
|
||||
确保自己的东西和`main`别差太远了,合并前,先从`main`来取并合并到自己的分支
|
||||
|
||||
```bash
|
||||
git checkout main
|
||||
git pull # origin main
|
||||
git checkout [branch-name] # 回到特征分支
|
||||
git merge main
|
||||
```
|
||||
|
||||
或者直接
|
||||
|
||||
```bash
|
||||
# 确保在特征分支
|
||||
git pull origin main
|
||||
```
|
||||
|
||||
如果冲突,会进入`([branch-name]|MERGING)` 状态
|
||||
|
||||
解决完冲突后,继续
|
||||
|
||||
```bash
|
||||
git merge --continue
|
||||
```
|
||||
|
||||
大文件处理完合并后,变成指针文件,这时候用下面指令拉回
|
||||
|
||||
```bash
|
||||
git lfs pull
|
||||
```
|
||||
|
||||
或者退出,不解决
|
||||
|
||||
```bash
|
||||
git merge --abort
|
||||
```
|
||||
取消曾经追踪过的文件,但不删除文件
|
||||
|
||||
```bash
|
||||
git rm --cached [file]
|
||||
```
|
||||
48
notes/starter.md
Normal file
48
notes/starter.md
Normal file
@@ -0,0 +1,48 @@
|
||||
1. 安装 Git
|
||||
打开 windows powershell,运行
|
||||
```powershell
|
||||
winget install Git.Git
|
||||
```
|
||||
|
||||
安装完毕后,所有终端我们都选择 Git Bash
|
||||
|
||||
设置本设备 git 的身份信息
|
||||
```bash
|
||||
git config --global user.name [your-name]
|
||||
git config --global user.email [your-email]
|
||||
```
|
||||
|
||||
初始化 lfs 以获取对大文件的支持
|
||||
```bash
|
||||
git lfs install
|
||||
```
|
||||
|
||||
2. 安装 VS Code
|
||||
```bash
|
||||
winget install vscode
|
||||
```
|
||||
|
||||
4. 安装 Volta
|
||||
```bash
|
||||
winget install Volta.Volta
|
||||
```
|
||||
|
||||
重启终端,安装 node
|
||||
|
||||
```bash
|
||||
volta install node
|
||||
```
|
||||
|
||||
5. 安装 claude code
|
||||
```bash
|
||||
volta install @anthropic-ai/claude-code
|
||||
```
|
||||
|
||||
(可选)安装 cc-switch
|
||||
https://github.com/farion1231/cc-switch/releases
|
||||
|
||||
(可选)安装 vscode claude 插件
|
||||
https://code.claude.com/docs/zh-CN/vs-code
|
||||
|
||||
(可选)安装 obsidian claude 插件
|
||||
https://github.com/YishenTu/claudian/releases
|
||||
Reference in New Issue
Block a user