git > show file changes and history
Nov 25, 2020
1. use-case
- I repeatedly pull changes from repos and need to quickly check what has happened to config files
- My colleagues troubleshoot data pipelines and, learning from them, I need to see what they have done to the files in question
2. pull & log -p
- this is not git diff
- run
git pull
→ fetch & merge potential merges - run
git log -p
→ see what has been changed
3. file history: who & commit message
git log –pretty=format:”%C(auto)%h%d%Creset %C(cyan)(%ci)%Creset %C(green)%cn <%ce>%Creset %s” –name-status –date=short –all –full-history — FILENAME