templates / branches--on commit rebase: prepare reset_head() for more flags (73d6d7b)
   1: this is just to ensure the directory exists.