I want to know how many lines of code I changed between two different commits. My purpose is to understand how many lines of code I've written today but my abstract idea is to understand how many lines of code I've write from a moment to another one. Can someone help me for this stuff?
Like many git commands git diff --shortstat
doesn't just work with commits, but also with branch names, tags, etc. So if you're on a feature/foo
branch and want to compare to develop
run.
git diff --shortstat develop
If you want to know how many lines changed since the last version tag (e.g. 3.1
) run
git diff --shortstat 3.1
--shortstat
is what you want:
git diff --shortstat commit1 commit2
You could also use it like:
git diff --shortstat "@{1 day ago}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With