Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Forking a Repository

Updated on 2024-12-11 GMT+08:00

Application Scenarios

The fork function can be used in large-scale projects with multiple sub-projects. You can fork a repository (an image) based on a repository and merge the CRs in the image to the source repository. When there is no merge, the modification of both the image repository and source repository will not affect each other.

As shown in the following figure, the complex development process occurs only in the image repository and does not affect the project version repo (source repo). Only the confirmed new features can be merged back to the project version repo. Therefore, fork is a team collaboration mode.

Differences Between Forking a Repository and Importing an External Repository

Both forking or importing a repo is a process of replication. The main difference lies in the association between the source repository and the copied repository. The details are as follows:

  • Fork
    • Forks are used to copy repositories on CodeArts Repo.
    • A fork generates a repository copy based on the current version of the source repository. You can apply for merging changes made on the fork to the source repository (cross-repository branch merge), but you cannot pull updates from the resource repository to the fork.
  • Import
    • You can import repositories of other version management platforms (mainly Git- and SVN-based hosting platforms) or your own repository to CodeArts Repo.
    • An import also generates a repository copy based on the current version of the source repository. The difference is that you can pull the default branch of the source repository to the repository copy at any time to obtain the latest version, but you cannot apply for merging changes made on the repository copy to the source repository.

Forking a Repository

  1. Access the repository list page.
  2. Click a repository name to go to the target repository.
  3. Click Fork in the upper right corner. In the displayed Fork Repository window, set parameters by referring to the following table.

    Table 1 Fork repository parameters

    Parameter

    Description

    Project

    Mandatory. Target project of the new repo. You can select a project name from the drop-down list.

    Path

    Optional. Target repo group path of the new repo. You can select a repo group path from the drop-down list.

    Repository

    Mandatory. Start with a letter, digit, or underscore (_). You can use letters, digits, hyphens (-), underscores (_), and periods (.). Do not end with .git, .atom, or periods (.).

    Visibility

    Mandatory. Indicates the visible scope of the source repo. The options are as follows:

    • Private: Only members of this repository can access it and commit code.
    • Public The value can be For project members, For tenant members, or For all guests.

    Synchronize commit rules of the source repository

    Optional. Indicates whether to synchronize the commit rules of the source repo. This option is selected by default, which means the source repo commit rules are synchronized. You can choose Settings > Policy Settings > Commit Rules to view the rule settings of the source repo and determine whether to select it.

  4. Click OK to fork the repository.

Checking the Fork Status of the Current Repo

  1. Access the repository list page.
  2. Click the source repository name.
  3. Click the number after Fork in the upper right corner of the page to view the list of forked repositories, as shown in the following figure. The current source repo is forked only once. Click the name in the Fork repo name column to go to the Code page of the forked repo.

Merging Changes of a Fork to the Source Repository

  1. Access the repository list page.
  2. Click the name of the forked repository.
  3. Click the Merge Requests tab.
  4. Click Create MR. On the Create MR page that is displayed, select a source branch and target branch to be merged.
  5. Click Next. On the Create MR page, set Title and Description, and click Create MR.
NOTE:

A cross-repository MR belongs to the source repository and can be viewed only on the Merge Requests tab of the source repository. Therefore, reviewers, scorers, approvers, and mergers must be members of the source repository.

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback