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
相关推荐
那年窗外下的雪.8 小时前
AIDC 学习日志|第 21 天|EVPN 多归属故障演练与中断窗口定位
网络·git·学习
玖石书11 小时前
Git Submodule 完全指南:从添加到日常维护的常规操作全流程
大数据·git·elasticsearch
微尘寒风13 小时前
git创建版本库
git
console.log('npc')1 天前
Git 冲突与 AI 协助指南
前端·人工智能·git·大模型
重生之我来学Python1 天前
Git-SVN 混合开发,从入门到精通!
开发语言·git·svn·github
笨笨饿1 天前
#137_死机恢复现场_Armino平台AP系统swd调试
git·python·stm32·单片机·嵌入式硬件·物联网·vim
King of fraud1 天前
Git 入门:从零开始的版本控制之旅
git
AI大模型-小华1 天前
Codex CLI第一次怎么用?从安装到读取本地项目完整教程
git·node.js·ai编程·开发工具·代码分析·codex·codex cli
2401_861678621 天前
Git 在 Windows 使用
windows·git·elasticsearch
青禾8372 天前
Git 与 SVN 完全指南:从集中式到分布式的版本控制
分布式·git·svn