1. 程式人生 > 實用技巧 >Typora結合Git打造完美的個人雲筆記本

Typora結合Git打造完美的個人雲筆記本

Typera是一款非常好用的markdown編輯器,我之前一直用這個軟體記錄自己的學習筆記,但是由於一些原因,我僅僅只能將這些筆記存在本地,昨天突然突發奇想
假如我將它和Git結合一下會不會就能打造自己的雲筆記本了?上網搜尋後,發現已經有人這樣做了,我自己也實驗了一下,確實很香。

安裝軟體

Typora

https://www.typora.io/windows/typora-setup-x64.exe

Git

https://git-scm.com/download/win

由於Git需要一些基本的配置,我已經配置好了,當初我是跟著廖雪峰老師的教程配置的:https://www.liaoxuefeng.com/wiki/1177760294764384

配置遠端倉庫

首先我們要註冊一個github,然後開一個倉庫作為自己的筆記倉庫

進入自己的本地資料夾

依次輸入命令

git init
git add *
git commit -m "first commit"
git remote add origin https://gitee.com/xxxx/markdownFile.git
git push -u origin master

建立推送分支和拉取分支的指令碼

GitPull.bat

echo "git pull orgin master...."

git pull origin master

GitPush.bat

echo "Start submitting code to the local repository"
echo "The current directory is:%cd%"
git add *
echo;



echo "Commit the changes to the local repository"
echo "please enter the commit info...."
set /p message=
set now=%date% %time%
echo %now%
git commit -m "%now% %message%"
echo;
 
echo "Commit the changes to the remote git server"
git push
echo;
 
echo "Batch execution complete!"
echo;

之後當你寫完推送上去點選推送指令碼就可以了,獲取最新筆記只需要點選拉取指令碼就可以了,很方便

參考:https://blog.csdn.net/oPengXiaoLiang/article/details/100678908