mirror of
https://github.com/git-tips/tips.git
synced 2024-09-21 00:01:03 +02:00
Tip: Which files have changed most since two weeks?
This commit is contained in:
parent
96124215b6
commit
fcc5ae2189
|
@ -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..
|
||||
|
|
|
@ -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.."
|
||||
|
|
Loading…
Reference in New Issue
Block a user