# cola **Repository Path**: china_lofty/cola ## Basic Information - **Project Name**: cola - **Description**: cola - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-12 - **Last Updated**: 2022-09-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 安装 阿里云服务器Debug时候出现此类错误解决方式 ```bash Error: ENOSPC: System limit for number of file watchers reached, watch '/root/cola/sidebars.js' ``` 解决方法 ```bash echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p sysctl --system ``` ## 实时备份Gitee 1. install git ```bash yum -y install git ``` 2. create new project, get info ```bash git config --global user.name "Haoxincheng" git config --global user.email "5498713+china_lofty@user.noreply.gitee.com" git init git add * git commit -m "first commit" git remote add origin https://gitee.com/china_lofty/cola.git git push -u origin "master" ``` 3. configure permanent password ```bash vim .git/config [credential] helper = store ``` 4. Exclude upload files ``` vim .gitignore node_modules/* nohup.out ``` 5. shell + crontab ```bash git add * git commit -m "first commit" git remote add origin https://gitee.com/china_lofty/cola.git git push -u origin "master" ``` ## 恢复项目 定时任务默认20分钟更新一次,可以通过历史的版本来进行回滚 首先先连接机器让停止更新到git,或者先找到出错之前的git项目版本号来进行恢复