Git version control--prevent blog code loss

Prevent Blog Loss

Open github and create a warehouse

New file.gitignore

 These things do not need to be uploaded to the remote warehouse

 

.DS_Store

Thumbs.db

db.json

*.log

node_modules/

public/

.deploy*/

.vscode/

.idea/

/.idea/

.deploy_git*/

.idea

themes/butterfly/git

_multiconfig.yml

Then type git init

 In this way, one of our warehouses has been created, and then we will push him to remote

git add .

 

 

 

 

 

 

 

 

Assuming that if the code or blog on the disk is gone, we can pull it directly from github

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/m0_59281987/article/details/129912339