基本
gitignore
A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; see the NOTES below for details.
查看区别
比较两个commit
git diff commid1 commit2 -- filename
比较工作区和commit区别
git diff commitid -- filename
比较两次commit的文件改动
git diff commid1 commit2 | grep "diff --git"
比较commit和工作区的文件改动
git diff commid1 | grep "diff --git"
查看commit 情况
git commit show commitid