Logseq同步
安装Git
- 参考官方文档
github仓库
- 登陆账号
- 新建仓库(私有仓库)
- 由于git推送不能使用账号密码方式作为验证了,所以还需要一个token
- 点击头像-setting-developer setting-personal access tokens-tokens (记得保存token)
Git命令行
- 进入logseq文件夹(你要推送到远程仓库的文件夹)
-
git init -b main #初始化 git add . #添加所有文件到 Git 仓库 git commit -m "1st commit" #提交更改 git remote add origin https://github.com/你的用户名/你的仓库名.git git push -u origin main git config --global credential.helper store #凭据存储
- 提示你输入github账号
- 密码输入上面生成的token
- 至此,你本地仓库的文件已经推送至github了
安装插件库里的Git插件
- 每次写了新笔记后,可以点击Commit&Push将数据同步到github了
另一台电脑上同步
git clone https://github.com/你的用户名/你的仓库名.git
cd 你的仓库名
git add .
git commit -m "你的提交信息"
git push
全局配置git
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --global credential.helper store #凭据存储
给git配置代理
- 由于某些不可控因素,git无法连接github。配置git全局代理(v2rayN代理工具)
-
# 配置socks5代理 git config --global http.proxy socks5 127.0.0.1:10808 git config --global https.proxy socks5 127.0.0.1:10808 # 配置http代理 git config --global http.proxy 127.0.0.1:10809 git config --global https.proxy 127.0.0.1:10809
版权声明:
作者:Gweek
链接:https://bbs.geek.nyc.mn/archives/172
来源:Gweek postHub
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论