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 小时前
博客目录框架
c语言·开发语言·arm开发·git·嵌入式硬件·神经网络·编辑器
Rabbit_QL3 小时前
【CI/CD】02_一次 git push 后发生了什么?CI 是怎么工作的
git·ci/cd
不会写DN4 小时前
Git 开发中最常用的命令与场景
大数据·git·elasticsearch
张二娃同学4 小时前
基于 Python 与 Tkinter 的猜数字游戏设计与实现:支持玩家猜数与 AI 反向推理
开发语言·git·python·游戏·开源
原来是猿5 小时前
Git【企业级开发模型】
git
bu_shuo5 小时前
git学习
git·学习
最贪吃的虎5 小时前
Mac安装Git教程
git·macos
海参崴-20 小时前
【Linux 项目自动化构建工具 -- make/makefile && 版本管理 Git 的使用&&第一个程序
linux·git·自动化
W-琑20 小时前
Git基本操作及操作原理
git
流星雨在线1 天前
项目 Git 分支 + Tag 管理规范
git