set branch in a git manner