Upsert branch

Create a new branch if it doesn't exist, or update the branch if it already exists.