branch: split off function that writes tracking info and commit subject