文档

如何关联已有文件夹或代码库?

更新时间:

在 Codeup 如何快速关联本地已有的文件夹或者迁移入已有的代码库呢?很简单,跟着下文操作吧~

关联本地文件夹

一个一个上传文件太耗时耗力了,你可以进入本地已有代码工程的文件夹,基于文件夹批量进行关联,然后推送至云端代码管理平台,对应命令如下:

cd existing_folder
git init
git remote add origin https://codeup.aliyun.com/xxx/xxx.git
git add .
git commit
git push -u origin master

在 Codeup 空代码库页面的「命令行指引」区域,也已为你准备好了如上的 Git 命令指引,快去试试吧:

1-7.png

导入三方托管的代码库

你可以采用两种方式导入已在三方托管的代码库。

  1. 命令行

    git clone --bare https://git.example.com/your/project.git your_path
    cd your_path
    git remote set-url origin https://codeup.xxxx.git
    git push --mirror
  2. Codeup 导入代码库功能

    通过网页端导入三方代码库

  • 本页导读 (0)
文档反馈