JS note
git使用
123$ git add file1.txt$ git add file2.txt file3.txt$ git commit -m "add 3 files."
add 可反复多次使用,添加多个文件
commit 只需一次,-m后面接上本次修改提示
12$ git status$ git diff
git status命令查看仓库当前状态,diff命令查看区别
12$ git log$ git reflog
git log查看最近到最远的提交日记
git reflog查看命令历史,以确定回到未来的版本
回退版本
1$ git reset --hard HEAD^
上个版本是HEAD^ 而上上版本是HEAD^^ ,而网上多个版本为HEAD~100,后面可接file文件名
1$ git checkout -- readme.txt
checkout可以将工作区的修改全部撤销,要么回到版本库,要么回到之前暂存区的状态
场景1:当你改乱了工作区某个文件的内容,想直接丢弃工作区的修改时,用命令git checkout -- file。
场景2:当你 ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment