![]() Really, you should be able to replace any git log command with git summary. ![]() As a result, Beyond Compare will be launched with both files ready to be compared. Here's another example or two git summary -author=brian After you set it as an external diff tool in sourcetree, you select both files you want to compare using CTRL and after that you press CTRL+D. That's what I was looking for, but it may not be what you expect. One last thing to note is that file changes is the number of changes to files, not the number of unique files changed. Summary = !git-stat-sum it works really well. Note the in the log command to pass on your arguments such as -author="Brian" or -since=yesterday.Įscaping the awk to put it into a git alias was messy, so instead, I put it into an executable script on my path ( ~/bin/git-stat-sum), then used the script in the alias in my. Here's a one-liner to get total changes instead of per-commit changes from git log (change the commit selection options as desired - this is commits by you, from commit1 to commit2): git log -numstat -pretty="%H" -author="Your Name" mit2 | awk 'NF=3 ' You might be interested in things like -since (rather than specifying commit ranges, just select commits since last week) and -no-merges (merge commits don't actually introduce changes), as well as the pretty output options ( -pretty=oneline, short, medium, full.). git log can also select commits in a variety other ways - have a look at the documentation. īut you can use -numstat or -shortstat as well. What you likely want to use is: git log -author="Your name" -stat. ![]() Since git log internally calls the diff machinery in order to print requested information, you can give it any of the diff stat options - not just -shortstat. Ron DeVera touches on this, but you can actually do a lot more than what he mentions. I somehow missed that you were looking to do this on multiple commits at the same time - that's a task for git log. ![]() stat produces the human-readable output you're used to seeing after merges -numstat produces a nice table layout that scripts can easily interpret. You want the -stat option of git diff, or if you're looking to parse this in a script, the -numstat option. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |