一、克隆Gitee仓库到本地
bash
git clone https://gitee.com/用户名/仓库名.git
cd 仓库名
二、添加 GitLab 仓库作为远程仓库
bash
git remote add gitlab https://gitlab.com/用户名/仓库名.git
三、查看所有远程仓库
bash
git remote -v
四、拉取 Gitee 上的目标分支
bash
git fetch origin 分支名
五、切换到目标分支
bash
git checkout 分支名
六、将本地分支推送到 GitLab
bash
git push gitlab 分支名
七、解决可能出现的冲突
bash
# 拉取 GitLab 上的分支(如果有)
git pull gitlab 分支名
# 解决冲突后提交
git add .
git commit -m "解决冲突并合并分支"
# 再次推送
git push gitlab 分支名