diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json index 9405bfd..436f43c 100644 --- a/.obsidian/core-plugins.json +++ b/.obsidian/core-plugins.json @@ -1,20 +1,30 @@ -[ - "file-explorer", - "global-search", - "switcher", - "graph", - "backlink", - "canvas", - "outgoing-link", - "tag-pane", - "page-preview", - "daily-notes", - "templates", - "note-composer", - "command-palette", - "editor-status", - "bookmarks", - "outline", - "word-count", - "file-recovery" -] \ No newline at end of file +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "properties": false, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": false +} \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 569b622..93d816d 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -4,19 +4,21 @@ "type": "split", "children": [ { - "id": "ac5d149d3a54bb3d", + "id": "077f9b345e160d73", "type": "tabs", "children": [ { - "id": "a7dc62ad9734e7f6", + "id": "1e2086f0928a3cb6", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "_posts/pool/2024-10-18-不太安全但管用的docker非root用户权限问题.md", + "file": "_posts/engineering/2024-09-11-git版本管理常见技巧.md", "mode": "source", "source": false - } + }, + "icon": "lucide-file", + "title": "2024-09-11-git版本管理常见技巧" } } ] @@ -39,7 +41,9 @@ "type": "file-explorer", "state": { "sortOrder": "alphabetical" - } + }, + "icon": "lucide-folder-closed", + "title": "文件列表" } }, { @@ -54,7 +58,9 @@ "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical" - } + }, + "icon": "lucide-search", + "title": "搜索" } }, { @@ -62,7 +68,9 @@ "type": "leaf", "state": { "type": "bookmarks", - "state": {} + "state": {}, + "icon": "lucide-bookmark", + "title": "书签" } } ] @@ -85,7 +93,7 @@ "state": { "type": "backlink", "state": { - "file": "_posts/pool/2024-10-18-不太安全但管用的docker非root用户权限问题.md", + "file": "_posts/engineering/2024-09-11-git版本管理常见技巧.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -93,7 +101,9 @@ "searchQuery": "", "backlinkCollapsed": false, "unlinkedCollapsed": true - } + }, + "icon": "links-coming-in", + "title": "2024-09-11-git版本管理常见技巧 的反向链接列表" } }, { @@ -102,10 +112,12 @@ "state": { "type": "outgoing-link", "state": { - "file": "_posts/pool/2024-10-18-不太安全但管用的docker非root用户权限问题.md", + "file": "_posts/engineering/2024-09-11-git版本管理常见技巧.md", "linksCollapsed": false, "unlinkedCollapsed": true - } + }, + "icon": "links-going-out", + "title": "2024-09-11-git版本管理常见技巧 的出链列表" } }, { @@ -116,7 +128,9 @@ "state": { "sortOrder": "frequency", "useHierarchy": true - } + }, + "icon": "lucide-tags", + "title": "标签" } }, { @@ -125,8 +139,10 @@ "state": { "type": "outline", "state": { - "file": "_posts/pool/2024-10-18-不太安全但管用的docker非root用户权限问题.md" - } + "file": "_posts/engineering/2024-09-11-git版本管理常见技巧.md" + }, + "icon": "lucide-list", + "title": "2024-09-11-git版本管理常见技巧 的大纲" } }, { @@ -134,7 +150,9 @@ "type": "leaf", "state": { "type": "git-view", - "state": {} + "state": {}, + "icon": "git-pull-request", + "title": "Source Control" } }, { @@ -142,7 +160,9 @@ "type": "leaf", "state": { "type": "calendar", - "state": {} + "state": {}, + "icon": "calendar-with-checkmark", + "title": "Calendar" } }, { @@ -150,7 +170,9 @@ "type": "leaf", "state": { "type": "copilot-chat-view", - "state": {} + "state": {}, + "icon": "message-square", + "title": "Copilot" } } ], @@ -173,12 +195,15 @@ "obsidian-excalidraw-plugin:新建绘图文件": false } }, - "active": "a7dc62ad9734e7f6", + "active": "1e2086f0928a3cb6", "lastOpenFiles": [ + "_posts/pool/2024-10-21.md", + "_posts/pool/2024-10-18-日记.md", + "_template/time_note.md", + "_posts/pool/2024-10-16-as-rag模块拓展思考.md", "_posts/pool/2024-10-18-npm_Node.js探秘.md", "_posts/pool/2024-10-18-不太安全但管用的docker非root用户权限问题.md", "_posts/pool/2024-10-18-Pinokio_AI浏览器调研.md", - "_posts/pool/2024-10-16-as-rag模块拓展思考.md", "_posts/engineering/2024-09-14-微信引入个人机器人踩雷篇.md", "_posts/engineering/2024-09-13-pip国内加速.md", "_posts/engineering/2024-09-13-linux安装全局可用的conda+创建有root权限的新账号.md", @@ -198,10 +223,7 @@ "_posts/pool/2024-09-21.md", "_posts/pool/2024-09-25.md", "_posts/pool/2024-10-08.md", - "_posts/engineering/2024-10-16-Elasticsearch之一百种你不得不记的RESTful api.md", "assets/img/mrj9tyfxgpwc4ohkdhkq3uu3azxww8g.png", - "_posts/brain/2024-09-06-github_page+obsidian实现个人笔记云管理.md", - "_posts/brain/2024-09-20-obsidian ios多平台同步超完美方案.md", "assets/img/Dingtalk_20240906094335.jpg", "assets/img/Dingtalk_20240906103403.jpg", "assets/img/Dingtalk_20240906103705.jpg", diff --git "a/_posts/engineering/2024-09-11-git\347\211\210\346\234\254\347\256\241\347\220\206\345\270\270\350\247\201\346\212\200\345\267\247.md" "b/_posts/engineering/2024-09-11-git\347\211\210\346\234\254\347\256\241\347\220\206\345\270\270\350\247\201\346\212\200\345\267\247.md" index 59e3bd2..94214e1 100644 --- "a/_posts/engineering/2024-09-11-git\347\211\210\346\234\254\347\256\241\347\220\206\345\270\270\350\247\201\346\212\200\345\267\247.md" +++ "b/_posts/engineering/2024-09-11-git\347\211\210\346\234\254\347\256\241\347\220\206\345\270\270\350\247\201\346\212\200\345\267\247.md" @@ -10,15 +10,15 @@ tags: - github --- ## 强制远程覆盖本地分支 -```git +```bash git fetch --all && git reset --hard origin/master && git pull ``` 其中`origin/master`为远程分支名,查询相应的远程分支名请使用: -```git +```bash git branch -r ``` 拓展:查询本地仓库分支名 -```git +```bash git branch -a ``` @@ -34,11 +34,11 @@ Tips: 1. 开两个`git bash` 2. 其中一个使用命令`git log`查询需回退的commit相应版本号,复制 3. 另一个使用命令: -```git +```bash git reset --soft 版本号 ``` 4. 强制同步到远程分支: -```git +```bash git push --force ``` 此操作不影响本地更改 @@ -46,18 +46,71 @@ git push --force ## 合并某次提交至指定分支 与上一主题类似,取版本号后,切换到需要**合并至**的分支: -```git +```bash git checkout branch-name ``` 拓展:新建分支 -```git +```bash git checkout -b new-branch-name ``` 合并提交至本分支: -```git +```bash git cherry-pick 版本号 ``` 执行后,若有冲突,会在相应文件中显示,vscode打开可一一核对,核对后在右下角检查完成合并即可。 TODO: 如何快速强制覆盖 +## 与主库同步进度(变基) + +在提交 Pull Request (PR) 之前,建议你将你的分支变基到最新的远程主库,这样可以确保你的代码和主库是最新的,从而减少潜在的合并冲突。这是一个良好的实践。 + +1. **获取最新的远程分支信息**: + + 首先,你需要确保你的本地仓库是最新的。运行以下命令来获取远程代码的最新状态: + + ```bash + git fetch origin + ``` + +2. **切换到你的工作分支**: + + ```bash + git checkout feature-branch + ``` + +3. **执行变基**: + + 现在,可以将你的分支变基到最新的远程主分支(例如 `main` 或 `develop`,具体取决于你的项目): + + ```bash + git rebase origin/main + ``` + + 这将重放你的提交在最新的远程分支之上,确保你的代码是基于最新状态的。 + +4. **解决冲突(如果有的话)**: + + 如果在变基过程中遇到冲突,Git 会提示你解决这些冲突。你需要手动编辑相关文件以解决冲突。解决完后,继续变基: + + ```bash + git add + git rebase --continue + ``` + + 如果需要放弃变基,可以运行: + + ```bash + git rebase --abort + ``` + +5. **推送到远程库**: + + 一旦变基成功,就可以推送了。 + 有时,你需要强制推送你的分支到远程库,因为变基会更改提交历史: + + ```bash + git push origin feature-branch --force + ``` + + **注意**: 强制推送会覆盖远程分支的历史,请确保你是在你自己的特性分支上,且对其他人没有影响。 \ No newline at end of file diff --git "a/_posts/pool/2024-10-18-\346\227\245\350\256\260.md" "b/_posts/pool/2024-10-18-\346\227\245\350\256\260.md" new file mode 100644 index 0000000..5455f58 --- /dev/null +++ "b/_posts/pool/2024-10-18-\346\227\245\350\256\260.md" @@ -0,0 +1,14 @@ +--- +title: 日记 +author: X +date: 2024-10-18 16:41:03 +0800 +categories: + - diary + - 24年 +tags: +--- +今天同时探索了中文版斯坦福小镇和flowise,都是闲着没事搜as发现的。 + +flowise是油管下评论看到的 + +这两个都是node.js相关 \ No newline at end of file diff --git a/_posts/pool/2024-10-21.md b/_posts/pool/2024-10-21.md new file mode 100644 index 0000000..ed971b2 --- /dev/null +++ b/_posts/pool/2024-10-21.md @@ -0,0 +1,7 @@ +--- +title: +author: X +date: "2024-10-21 17:46:31 +0800" +categories: +tags: +---