#protip: how to make git log -p readable again with package-lock.json in the mix


(Tom Boutell) #1

My new “log” alias:

alias log=‘git log -p – . “:(exclude)package-lock.json”’

Nice when you just want to page through your changes at the command line without the distraction of package-lock changes going on for pages and pages and pages.


(Daniel Stockman) #2

Another approach I have seen is to tell git (via a repo-local .gitattributes file) to treat package-lock.json as a binary file, thus hiding its patch output from commands like git log -p. I’m not sure that’s a globally-appropriate solution, however, as a bit of googling indicates it might have bad side-effects when resolving merge conflicts?


(system) #3

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.