git dirty solution to a badly-defined problem