跳到主要内容

Project Creation, Import, and Migration

When creating, importing, or migrating projects on the GitCode platform, please pay attention to the following points to ensure a smooth process.

提示
  1. The path of each project (including organization name and project name) must be unique within the platform. Please check if the path is already in use when creating the project.
  2. If the project is set to public, all users can access the project content, including code, Issues, Wiki, etc. Ensure that the content is suitable for public sharing.

Operation Entry


Click "New +" at the top of any page to see options for "Create Project" and "Import Project."

image-20250115113514878

Create Project


GitCode allows users to create blank repositories or import repositories from existing projects to better store, track, and collaboratively develop code.

During the creation process, you can:

  • Create the project within your GitCode account/organization
  • Choose to create a code repository, model repository, or dataset repository based on your needs
  • Create both public and private projects
  • Initialize the project by selecting README.md, .gitignore, LICENSE files

image-20241226143043513

Create Projects Using Template Modules


GitCode supports quick project creation through template projects. New projects will include all files from the template project and an initial commit, without any historical commits. This feature significantly improves project creation efficiency and helps users easily create standardized projects across different organizations or namespaces.

  1. Set up template project: In "Project Settings - Basic Settings," check the "Template Project" option to provide template project selection during subsequent new project creations.
  2. Use template project: When creating a new project, select the checked template project for quick initialization.

image-20250224134629467

image-20250224134738167

Import and Migrate Projects


Import Project

GitCode provides a URL-based project import function, making it easy to bring external repositories into GitCode for further management, collaboration, and version control.

The URL import project feature can help you:

  • Migrate projects: Seamlessly migrate external or existing projects to GitCode for better management and collaboration.
  • Leverage GitCode features: Enhance project management using GitCode's version control, issue tracking, Pull Requests, etc.
  • Cross-platform collaboration: Allow developers from different platforms to collaborate, making the project more flexible and scalable.

If the imported project is private, you need to provide credentials for the source hosting platform, supporting personal access tokens (PATs) or "username + password" methods.

The import steps are as follows:

  1. Choose the project type based on your needs: code repository, model repository, or dataset repository.
  2. Enter the Git project URL; the URL must be accessible and end with .git.
  3. Private project settings (optional): If the imported project is private, you also need to provide credentials for the source hosting platform, supporting personal access tokens (PATs) or username + password methods.
  4. Select the account the project belongs to: choose the GitCode account/organization where the repository will be imported.
  5. Configure import options: Customize import options according to your needs, such as project name, path description, whether it is public, etc.
  6. Wait for the import to complete: GitCode will start importing the project, and you can view the import progress on the import progress page.

image-20241226144144745

Here are best practices for using the URL-based project import feature:

  • Ensure the external repository's URL is publicly accessible before importing (private projects require prior preparation of corresponding credentials).
  • Carefully configure import options to ensure the import process meets your project requirements.
  • Regularly synchronize and update the imported repository after import to keep it in sync with the external project.

Migrate Project

GitCode project migration allows you to directly import projects from GitHub, Gitee, GitLab without manually cloning and pushing the project. Just provide your GitHub, Gitee, GitLab personal access token (PAT), and select the project to be imported. GitCode will handle the rest.

提示

Currently, only project Git repositories can be migrated. Project Wiki, Issues, PRs, and Releases are not supported for migration and import.

Obtain Access Tokens

To use GitCode for project migration, you need to prepare personal access tokens for GitHub and Gitee so that GitCode can access your project repositories. Detailed steps to generate personal access tokens can be found on the official websites of GitHub and Gitee:

Next, you can complete the project migration and import with simple steps on the GitCode interface.

Steps to Migrate Projects

  1. Select migration platform: Choose the platform you want to migrate from. GitCode currently supports migrations from GitHub, Gitee, and GitLab.
  2. Select the account the project belongs to: Choose the GitCode account/organization where the repository will be imported.
  3. Enter personal access token: Input the personal access token for the corresponding platform in the dialog box on the page. Ensure your token has appropriate permissions to access the project you want to import. The system will automatically remember the last valid token, and you can also choose to replace it with a new one.
  4. Click "Migrate Project": Click the "Migrate Project" button on the page.
  5. Select the project to be imported: Search and select the project you want to import on the page. It is recommended to quickly filter the projects you want to import using the namespace. You can also choose to batch import multiple projects.
  6. Configure import options: Customize import options according to your needs, such as project ownership, project path, etc.
  7. Click "Import Project": Click the "Import" button or "Batch Import" to start importing the project. The system will automatically begin cloning and pushing the project repository to GitCode.
  8. Wait for import completion: The import process may take some time, depending on the size of the project repository and network speed. Please wait patiently until the import is completed.

image-20250115110558212

image-20250115110308777