比如打包所有的修改文件:
tar czf changed-files.tar.gz `git diff --name-only [diff options]`
git diff --cached
--cached
means show the changes in the cache/index (i.e. staged changes) against the current HEAD
. --staged
is a synonym for --cached
.
--staged
git status -s | cut -c4-