github blog branch backup source file - Hexo station (D)

Here Insert Picture Description
All files Hexo established blog, the beginning is not .git folder.

  1. First, enter the .deploy_gitdirectory, create a new branchhexo
    git branch hexo
  2. Then the directory .gitfolder to the root directory of the blog, which is the parent directory.
  3. Git bash In operation, switching to hexo branch.
    git checkout hexo
  4. The first file in the root directory of the index, the push to a remote repository hexo branch.
    // add files to the repository
    git add .
    // uploaded to the repository
    git commit -m "描述信息"
    // add remote push address
    git remote add <shortname> <url>
    , for example: git remote add origin git @ github . COM: UserName / UserName.github.io.git
    // the contents of the local repository pushed to the remote repository
    git push origin hexo

Note:

Do not worry when the remote will submit.deploy_gitdirectory submit an up, there is a file in the root directory of the blog.gitignore, here are the contents inside, because the file has already put.deploy*all the contents ignored, so the time of submission, only the remaining documents submitted to the blog warehouse hexo branch up. after completion of the above operation, refresh the warehouse will see that there are two branches. this is even completed.

.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/

[Reference link]

backup source file blog

use Github branch source file backup Hexo

He published 190 original articles · won praise 153 · views 90000 +

Guess you like

Origin blog.csdn.net/qq_36852780/article/details/104675826