Tip: Which files have changed most since two weeks?

This commit is contained in:
MarcosEllys 2018-08-22 20:20:41 -03:00
parent 96124215b6
commit fcc5ae2189
2 changed files with 10 additions and 0 deletions

View File

@ -46,6 +46,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [Stage parts of a changed file, instead of the entire file](#stage-parts-of-a-changed-file-instead-of-the-entire-file)
* [Get git bash completion](#get-git-bash-completion)
* [What changed since two weeks?](#what-changed-since-two-weeks)
* [Which files have changed most since two weeks?](#which-files-have-changed-most-since-two-weeks)
* [See all commits made since forking from master](#see-all-commits-made-since-forking-from-master)
* [Pick commits across branches using cherry-pick](#pick-commits-across-branches-using-cherry-pick)
* [Find out branches containing commit-hash](#find-out-branches-containing-commit-hash)
@ -386,6 +387,12 @@ __Alternatives:__
git whatchanged --since='2 weeks ago'
```
## Which files have changed most since two weeks?
```sh
git log -M -C --name-only --since="2 weeks ago" --all --format='format:' "$@" | sort | grep -v '^
| uniq -c | sort -n | awk 'BEGIN {print "count\tfile"} {print <!-- @doxie.inject start --> "\t" <!-- @doxie.inject end -->}'
```
## See all commits made since forking from master
```sh
git log --no-merges --stat --reverse master..

View File

@ -109,6 +109,9 @@
"title": "What changed since two weeks?",
"tip": "git log --no-merges --raw --since='2 weeks ago'",
"alternatives": ["git whatchanged --since='2 weeks ago'"]
}, {
"title": "Which files have changed most since two weeks?",
"tip": "git log -M -C --name-only --since=\"2 weeks ago\" --all --format='format:' \"$@\" | sort | grep -v '^$' | uniq -c | sort -n | awk 'BEGIN {print \"count\\tfile\"} {print $1 \"\\t\" $2}'"
}, {
"title": "See all commits made since forking from master",
"tip": "git log --no-merges --stat --reverse master.."