Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git完整迁移项目 #42

Open
Bobjoy opened this issue Jan 5, 2021 · 0 comments
Open

git完整迁移项目 #42

Bobjoy opened this issue Jan 5, 2021 · 0 comments

Comments

@Bobjoy
Copy link
Owner

Bobjoy commented Jan 5, 2021

  1. 克隆原有仓库下的项目

git clone old.git(旧git仓库地址)

你也可以单独克隆某个分支

git clone -b dev old.git

  1. 创建新的项目的仓库地址

  2. 进入旧项目的地址,比如clone下的目录为test

cd test

将旧项目的地址替换为新的

git remote set-url --push origin new.git (new.git 为新项目的git地址)

  1. 将镜像推送到远程

git push --mirror

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant