by katet · 7y ago · 0 comments
git diff --color-moved
(seriously, read through the man page for git diff sometime)
git log -p --all -- <path/to/file>
(I use this with multiple remotes, so I can track changes in my fork and in upstream when looking for context around a file)
git cherry-pick -x
(for automatically adding a reference to the original commit)
A couple more, but I think they're really quite specific to my personal workflow and responsibilities
I agree about `git log -p`. A good trick with that is to use it as a quick way to search for a commit that includes a certain string (since the pager is less, one can search back in time with `/`).
Same trick for `git reflog -p`.
`git stash show -p` is another less-known diff command (look at a stash without applying it).
I like this one. I'll remember it. Thanks for sharing!