我發現git-status有時候很慢,查了一下,有人說用git-gc來加快access
於是我下了git-gc,等了幾分鐘後還是沒run完,一看memroy,竟被吃光了:
peter$ git-gc後來改用
Counting objects: 88839, done.
Compressing objects: 18% (15328/84733)
git-diff --stat就快多了
petert$ git diff --stat drivers/git-status用git-commit同樣的options, 主要是用來比較git-commit時會發生那些變動
.../hal/linux/public/mipsisa32-be-elf.opt_ah.h | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
git-status其實就是git-commit --preview, 見意採用git-diff --stat…
http://stackoverflow.com/questions/715321/git-status-is-there-a-way-to-show-changes-only-in-a-specific-directory
The reason thatgit statustakes the same options asgit commitis that the purpose ofgit statusis to show what would happen if you committed with the same options as you passed togit status. In this respectgit statusis reallygit commit --preview.
To get what you want, you could do this which shows staged changes:
and this, which shows unstaged changes:git diff --stat --cached --
or this which shows both:git diff --stat --
git diff --stat HEAD --
沒有留言:
張貼留言