Back-up the source files of my blog.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
backup-tools
.gitignore
LICENSE
README.md
backup-mac.sh
backup-win.bat
update-mac.sh
update-win.bat

README.md

README

Back-up the source files of my blog.

coneycode/hexo-git-backup is more popular, you also can try it.

env

  • git
  • Python 2.7: Tested.
  • Python 3.x: Not tested.

Install Hexo

Reference Hexo

  • Install Hexo
  • Create hexo blog
  • Install theme

clone repo to local

  • Go to the root directory of hexo blog.
  • git clone https://github.com/tanchao90/hexo-git-backup.git

modify remote origin to your repo

  • git remote set-url origin https://github.com/username/repo.git

backup source files to Git

  • cd hexo-git-backup
  • config.py: check and modify.
  • backup-win.bat or sh backup-mac.sh: copy source files to git repo
  • git ops: add, commit, and push files to Github or Bitbucket.

update source files from Git

  • cd hexo-git-backup
  • config.py: check and modify.
  • update-win.bat or sh update-mac.sh: pull source files and copy it to the root directory of hexo blog.
  • history-files is used to store the history files that has been overwrited by the same file in git repo.

Reference