1. 首先在git创建新的仓库,复制url后在git bash进行克隆(此步会得到一个空的文件夹

$ git clone https://gitee.com/sloent/obsidian.git

2. git add .

补充:以下设置可以在提交时自动地把回车(CR)和换行(LF)转换成换行(LF),而在检出代码时把换行(LF)转换成回车(CR)和换行(LF)

$ git add .
warning: in the working copy of '笔记.md', LF will be replaced by CRLF the next time Git touches it
git config --global core.autocrlf true

3. 提交

$ git commit -m "12.20笔记"

4. 第一次push要用以下命令,后面直接git push即可

$ git push -u origin master

注意修改md笔记中图片保存路径。

没修改会无法识别图片:

Obsidian配置如下:

补充:

下载Obsidian Git插件

开启 commit and push,设置commint pull push等对应时间,设置后重启生效

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐