All files Hexo established blog, the beginning is not .git folder.
- First, enter the
.deploy_git
directory, create a new branchhexo
git branch hexo
- Then the directory
.git
folder to the root directory of the blog, which is the parent directory. - Git bash In operation, switching to hexo branch.
git checkout hexo
- 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_git
directory 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