Seems like sometimes the build might fail before the commits, and in that case, you really would want rebuild to do everything again. So, maybe it makes more sense to query git to see if the commit was done.