Adding branch function to encapsulate git branching logic