1. 4
  1.  

  2. 1

    Instead of manually (un)commenting it all the time, use something like git diff --cached | grep FIXME to search only the staged (to be commited) changes for FIXMEs.

    EDIT: Sorry, this will only work as a pre-commit hook, my bad. To make this a pre-push hook, git fetch the remote and run the diff against the remote HEAD.

    1. 1

      To make this a pre-push hook, git fetch the remote and run the diff against the remote HEAD.

      I think if you do that the alarm will go off if the remote HEAD fixes FIXMEs that still exist in your branch.

      Better to diff against last(public() and ancestors(.)); in Git speak I think that would be origin/my_branch_name, which AFAICT you can obtain via origin/$(git rev-parse --abbrev-ref HEAD). Although that breaks if you are in a detached head state. Is there a more idiomatic way to do this?