hexo,github常用命令 github

1
2
3
npm install hexo -g #安装
npm update hexo -g #升级
hexo init #初始化

简写

命令 含义
hexo g == hexo generate #生成
hexo s == hexo server #启动服务预览
hexo d == hexo deploy #部署

github

配置本地用户和邮箱

1
2
git config --global user.name "HanShuliang"
git config --global user.email "[email protected]" //设置邮箱

git init 将一个目录初始化为 Git 仓库

1
git init

git clone 复制一个 Git 仓库

1
git clone [url]

基本快照

1
2
3
4
5
6
7
8
9
10
11
12
13
14
git add #添加文件到缓存
git status #查看你的文件在工作目录与缓存的状态
git diff #显示已写入缓存与已修改但尚未写入缓存的改动的区别
git commit #记录缓存内容的快照
git reset HEAD #取消缓存已缓存的内容
git rm #将文件从缓存区移除
git remote #罗列、添加和删除远端仓库别名
git remote add github [email protected]:schacon/hw.git
git remote rm #删除现存的某个别名
git push #推送你的新分支与数据到某个远端仓库
git push github master