项目迁移命令

1、选择不同分组

根据不同域名选择不同分组

  • 项目A:*.a.com
  • 项目B:*.b.com
  • 项目C:*.c.cn
  • mobile:App所有项目
  • 接口:三个接口系统
  • 学习:运维学习项目、各岗位学习的框架类库等

2、创建项目

在对应分组下新建项目,项目命名规则按照域名创建(.换成_),例如:https://api.xxxxxx.com 则该项目名称为:api_xxxxxx_com

3、查看当前仓库地址

复制代码
git remote -v

4、更改仓库地址

复制代码
git remote set-url origin http://newgit/xxx.git

5、查看当前仓库地址

复制代码
git remote -v

6、提交当前代码到远程分支;如果想把旧仓库其他分支提交到新仓库中,可以先拉取下来,切换到该分支,然后再提交

复制代码
git push -u origin master

7、把所有的tags推送到新的仓库

复制代码
git push origin --tags

8、设置分支

  • 默认分支:develop
  • 保护分支:master

9、添加成员

相关推荐
不做无法实现的梦~4 天前
Git 新手到团队协作与 GitHub/GitCode 指南
git·github·gitcode
laoli_coding6 天前
如何将GitCode仓库的提交同步到 GitHub
github·gitcode
. . . . .7 天前
Claude Code 插件市场开发及注意事项
人工智能·gitcode
残歌7 天前
【无标题】
gitcode
weixin_7042660513 天前
IDEA 整合 Git 并上传代码到 CSDN GitCode 超详细教程
git·intellij-idea·gitcode
云渊未归0615 天前
Python获取GitCode项目信息
python·数据分析·开源·网络爬虫·gitcode
本地化文档20 天前
rust-nomicon-l10n
rust·github·gitcode
本地化文档20 天前
setuptools-docs-l10n
python·github·gitcode
本地化文档1 个月前
rustup-book-l10n
rust·github·gitcode
本地化文档1 个月前
requests-docs-l10n
python·http·github·gitcode