Git: Use enums instead of numbers for branch root nodes

Change-Id: I52e9fce33c2a157389a88377e2f24695e8c3722d
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>