$ git show <commit>但這樣沒辦法清楚列出到底是有哪些檔案有異動
只顯示異動的檔案,不顯示程式碼的話,請加上 --name-only 的參數
$ git show --name-only <commit>要更進一步的只顯示檔案,連 commit 的相關資料也不要顯示的話
$ git show --pretty="format:" --name-only <commit>以上,簡單的列出檔名
$ git show <commit>$ git show --name-only <commit>$ git show --pretty="format:" --name-only <commit>"I'm an egotistical bastard, and I name all my projects after myself. First Linux, now git."
$ git config --global user.name "username" $ git config --global user.email "username@email.com"
$ git config --global color.diff auto $ git config --global color.status auto $ git config --global color.branch auto $ git config --global color.log auto
$ git config -l
# 註解,會被忽略。 *.a # 不要追蹤檔名為 .a 結尾的檔案 !lib.a # 但是要追蹤 lib.a,即使上方已指定忽略所有的 .a 檔案 *.swp *~
$ sudo apt-get install git-core這樣就裝好了..結束!了嗎?
$ cd project $ git init
$ git add .(. 指目前所在目錄,當然也可以指定檔案)
$ git commit輸入指令後會進入編輯器,為目前的資料變動加上說明