# 在本地克隆源仓库
git clone <源仓库的URL> source-repo
# 进入克隆的源仓库目录
cd source-repo
# 检查源仓库中的所有分支
git branch -a
# 切换到源仓库的 source-branch 分支
git checkout source-branch
# 将源仓库的 source-branch 分支重命名为 target-branch 分支
git checkout -b target-branch
# 推送新的 target-branch 分支到目标仓库
git remote add target-repo <目标仓库的URL>
git push target-repo target-branch