Your package. json file will tell the story of the dependencies in your project.
I wanted to find out when a certain dependency changed which caused a project structure change.
To achieve I setup a:
- A terminal on the left running the log commands on the package.json file.
- A terminal on the right showing a diff of only the package.json file via git show.
git log --reverse -- package.json
git log --reverse -- package.json | grep commit
git log --reverse -- package.json | grep <sometext> -A 3 -B 4
function gsp() { git show "$@" -- package.json; }; # I added to bashrc and sourced. But can just be added inline.
gsp <sha1>
gsp <sha2>
gsp <sha3>
After that research I thought it would be fun to look at all merges that say Pull request in reverse order.
git log --reverse --merges
git log --reverse --merges | grep Pull
# Note: Some tools like bitbucket auto generate text in their pr's that state "Pull request" which is why I used grep Pull