I am working on a git repository which contains huge number of files changed b/w one commit to another, how to extract the number of files changes b/w commits.
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
In windows:
The important windows-specific piece is that you must replace the wc command used in other solutions with this:
The
git whatchanged
tool shows you a summary of files that were modified. By itself it lists all commits, but you can also limit it to just the recent n commits:To count files:
See
git help whatchanged
for details.This gives the list of files changed like this:
1 file changed, 1 insertion(+), 1 deletion(-)
Optionally you can add the commit code if you don't want to get the information from the latest.
use this:
eg:
this works just like
Apart from the above listed methods you can do this too:
git diff HEAD^..HEAD --name-only
- will give the list of files changed betweenHEAD
and one revision before HEAD (HEAD^
). You can replaceHEAD^
with a SHA1 of the "from" commit andHEAD
with the SHA1 of the "to" commit:git diff <SHA1-of-from-commit>..<SHA1-of-to-commit> --name-only
So if you pipe the output to
wc -l
it should give you the number of files changed between commits.