xxxxxxxxxx
# Assuming you already have the repository cloned and are currently on the desired branch
# Create and switch to a new branch based on another branch
git checkout -b new-branch existing-branch
xxxxxxxxxx
// Go first to the branch where you want to make a copy of
git checkout -b subbranch branch