【轉(zhuǎn)載】http://www.crazyjiang.cn/2017/09/07/git/
將本地目錄上傳到遠(yuǎn)程倉庫
$ git init
$ git add .
$ git commit -am "###"
$ git remote add origin https://gitee.com/wjjiang/CustomView.git
$ git pull --rebase origin master
$ git push origin master
查看代碼修改的內(nèi)容
$ git diff <file> --比較某文件與最近提交節(jié)點(diǎn)的差異
$ git diff <hashcode> <hashcode> <file> --比較某文件在提交節(jié)點(diǎn)a衔蹲,節(jié)點(diǎn)b的差異
撤銷本地修改
$ git checkout -- <file>