git copy branch to another branch code example Example: creating copy of a branch git checkout -b new_branch old_branch