先在Terminal 輸入:git
defaults write com.apple.finder AppleShowAllFiles -bool true npm
而後輸入下面的vim
killall Finderapi
若是想再讓顯示的隱藏文件再隱藏起來能夠:緩存
defaults write com.apple.finder AppleShowAllFiles -bool falsehexo
同時仍是要輸入app
killall Finderssh
git help checkout 查看checkout 命令如何使用, :wq 退出vim編輯器編輯器
ls -l 查看文件下的全部文件spa
ls -l -a 查看文件下的全部文件(包含隱藏文件)
cat 文件名 查看文件內容(至關於右鍵打開)
git config "user.email" 1271010099@qq.com 配置郵箱(團隊協做)
touch 建立文件
git commit -m "添加啦c.m" c.m 將緩存區某一個文件提交到本地倉庫
git commit -m "註釋在這裏不能爲空" 將緩存區提交到本地倉庫
git add 文件名 將工做區文件添加到緩存區
git add . 將工做區文件全部文件,添加到緩存區
git config -l 查看配置信息
git config alias.ci "commit -m" 給commit -m 取一個別名
接下來這樣提交文件
touch Cat.m 建立一個新的文件
git add . 添加到緩存區
git ci "添加了Cat.m" 將緩存區提交到本地倉庫
git log 當前路徑全部日誌
git log 文件名 該文件的操做日誌
git log --pretty=oneline 一行輸出log
git config alias.cfg config 給config 取一個別名
git cfg alias.log1 "log --pretty=oneline" 給log --pretty=oneline 取一個別名
git log1 輸出打印
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" 配置一個全劇的log 輸出
若是你想看到git log的變化的行數,請輸入 git lg -p
git cfg alias.rst "reset --hard" 版本回退
git rst HEAD^ 回退到 上一個版本
git rst HEAD^^ 回退到 上上一個版本
git rst HEAD^^^ 回退到 上上上一個版本
另外一種寫法
git rst HEAD~1
git rst HEAD~2
git rst HEAD~3
git rst 版本號 穿梭回去
git reflog 查看歷史操做
ssh-keygen
cd ~
cd .ssh
cat id_rsa.pub
localhost:hexo wangyakang$ hexo d
ERROR Deployer not found: git
npm install hexo-deployer-git --save