hexo和git常用命令
hexo常见操作
1 2 3 4 5 6 7 8
| hexo clean hexo generate hexo deploy
hexo new [layout] <title> hexo server --draft hexo publish draft <title>
|
git常见操作
参考Git使用教程,最详细,最傻瓜,最浅显,真正手把手教 - 知乎 (zhihu.com)
git的工作流程
![img]()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| git config --global user.name "name" git config --global user.email "email"
git init
git add <file>
git commit -m "msg"
git status
git diff <file>
git log [--pretty=oneline] git reflog git reset [--hard] HEAD^ git reset [--hard] HEAD~N git reset [--hard] <commit> git reset --soft <commit> git checkout <commit>
git checkout -- <file> git restore --staged <file> git reset <file> git reset [--mixed]
ssh-keygen -t rsa-C "email" git remote -v git remote add <name> <url> git branch -M main git branch --set-upstream-to=origin/main main git push [-u] <name> <branch> git push <name(远程仓库名称)> <branch1(本地分支名称)>:<branch2(远程分支名称)> git fetch git pull git checkout -b <new-branch> <start-point>
git branch git branch <branch_name> git checkout <branch_name> git checkout -b <branch_name> git merge <branch_name> git branch -d <branch_name>
git stash git stash list git stash apply git stash drop git stash pop
|