Git操作

1. Git仓库迁移

  1. 克隆旧仓库代码
bash 复制代码
git clone http://gitlab.example.com/lowcode/cctd-platform-datareport.git
  1. 拉取全部远程分支到本地
bash 复制代码
cd cctd-platform-datareport/
git branch -a
for branch in `git branch -r | grep -v '\->'`; do
   git branch --track "${branch#origin/}" "$branch"
done
  1. 重设远程仓库origin地址,推送代码
bash 复制代码
git remote rename origin upstream
git remote add origin http://172.16.92.64:3000/shiys/platform-datareport.git
git push -u origin --all
git push -u origin --tags
git remote rm upstream
相关推荐
一技安身2 小时前
【Git】零基础入门实战教程(Windows 完整版,适配竞赛仓库)
windows·git
LXY_BUAA5 小时前
Git_在飞牛中部署 GitLab_20260817
git·gitlab
阳墨余7 小时前
Git 同时管理 Gitee 和 GitHub 的 SSH 配置实战
git·gitee·github
fengyehongWorld15 小时前
Git 认证凭据管理
git
暮云星影1 天前
git版本发布
git·gitee·github·gitea
乌夷1 天前
Git Flow 分支模型
git
独隅1 天前
VS Code Git 工作树多分支并行开发实战评测
git
暮云星影1 天前
git仓库分支管理
git·gitee·github·gitea
互联网中的一颗神经元2 天前
ZZ — Git 速查表
大数据·git·elasticsearch
早安试言2 天前
git使用
git