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
相关推荐
zhensherlock2 小时前
Protocol Launcher 系列:Working Copy 文件操作与高级命令详解
javascript·git·typescript·node.js·自动化·github·js
摆烂z16 小时前
AI同时完成多个功能(Git WorkTree)
git
___波子 Pro Max.21 小时前
Git Worktree 可视化理解指南
git
happymaker06261 天前
git使用快速入门
git
不做超级小白1 天前
从零到可用:在手机上用 Termux + Git + Obsidian 打造稳定同步环境(踩坑全记录)
git·智能手机
凡客丶1 天前
Git安装与使用保姆教程【超详细】
git
android_cai_niao1 天前
给Git项目添加多个远程仓库
git·gitee·github
胡小禾1 天前
多账号下git自动切号
git
zhensherlock1 天前
Protocol Launcher 系列:Working Copy 提交与同步全攻略
javascript·git·typescript·node.js·自动化·github·js
前端若水1 天前
Git 全命令超级详细指南
大数据·git·elasticsearch