Tag: git

  • git command to find when a line mentioning “string” was removed from a file on main

    Additions and updates to a line are easy, because you can just git blame on the file in question and find who and/or what is responsible for the latest change. However, it’s hard to git blame a line that was removed, right? git log -S<string> Look for differences that change the number of occurrences of…

  • zsh alias to make and apply patch with git diff

    I keep having to look up [patching with git diff](http://tamsler.blogspot.com/2009/02/patching-with-git-diff.html) to remember the syntax whenever I want to create and apply a patch file. Solution? Create an alias for it. It only uses one file, /tmp/patchfile, so don’t try to manage multiple patches with this (maybe I’ll make more intelligent/sophisticated someday. In my .zlogin, I…