## 1 、 config
~~~
# git 現有的config lists
git config --list
git config --global user.name "yourName"
git config --global user.email "yourEmail@gmai.com"
# add
git add .
# commit
git commit -m 'comments'
~~~
~~~
# stash
git stash # 切換到別的分支之前 先執行 git stash 保存到緩存區
git stash list #查看所有
git stash pop # 取出最近的一次 stash
git stash apply stash@{X} # 取出想要的stash
~~~
~~~
# reset
git reset --hard 'versionXXX' # 徹底退回到某個版本,本地代碼的修改一起沒了
git reset --soft 'versionXXX' # 回到某個版本,commit 撤回了,本地代碼的修改還在
git reset --hard HEAD^
git reset --soft HEAD^
~~~