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
Help Center/ CodeArts Repo/ User Guide/ Uploading Code Files to CodeArts Repo/ Committing Code in Eclipse and Creating a Merge Request

Committing Code in Eclipse and Creating a Merge Request

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

If EGit is installed on your local Eclipse, you can commit the local Git repository code to CodeArts Repo. CodeArts Repo supports only Eclipse 4.4 and later versions.

NOTE:
  • For the first push:
    1. Create a repository on the local computer, that is, the local repository.
    2. Commit the update to the local repository.
    3. Pull the code from the server to the local repository, merge the code, and push the repository to the server. After remote commit is complete.
  • If it is not the first push:
    1. Commit the modified code to the local repository.
    2. Pull the code from the server to the local repository, merge the code, and push the repository to the server.

Step 1: Installing EGit on Eclipse

Perform the following steps to install Eclipse 4.4:

On the Eclipse toolbar, choose Help > Install New Software.... In the Install window that is displayed, click Add..., enter EGit in Name and EGit plug-in address in Location, click OK, and click Next > until the installation is complete. After the installation is complete, restart Eclipse.

Step 2: Configuring EGit on Eclipse

  1. On the Eclipse toolbar, choose Window > Preferences > Team > Git > Configuration and enter the User Settings information.

  2. Click OK.

    email indicates the bound email address. If the username is not set previously, set it in this step.

Step 3: Creating a Project and Committing Code to the Local Git Repository

  1. Create the git_demo project and the HelloWorld.java class.

  2. Share the git_demo project with the local repository.

  3. In the Share Project window displayed, select Git.

  4. Click Next >. In the Configure Git Repository dialog box, select Use or create repository in parent folder of project and click Create Repository.
  5. Click Create Repository to create a Git repository.

    The directory is in the untracked status, indicated by a question mark (?).

    Choose Team > Commit... to commit code to the local repository.

  6. In the Commit Changes dialog box displayed, set the commit message.

  7. Click Commit to commit the code to the local repository.

Step 4: Committing Code in the Local Repository to the Remote Git Repository

  1. Create a repositor in CodeArts Repo. For details, see Overview.

    Go to the repository details page and copy the repository URL.

  2. Choose Team > Remote > Push... to push the code to the remote repository.

  3. In the Push to Another Repository dialog box, set the parameters.

  4. Click Next. The Push Ref Specifications dialog box is displayed.

  5. Click Add Spec.

  6. Click Next. The Push Confirmation dialog box is displayed.

  7. Click Finish.

  8. Click OK.

    Log in to the remote repository and check the submitted code.

    NOTE:

    When Eclipse connects to the repository of CodeArts Repo using HTTPS, the message "Transport Error: cannot get remote repository refs. XXX.git: cannot open git-upload-pack" is displayed. This is because the EGit plug-in configuration in Eclipse is incorrect. Solution: Right-click in Eclipse and choose Windows > Preferences > Team > Git > Configuration > User Settings from the shortcut menu. Click Add Entry, set Key to http.sslVerify, and set Value to false.

Step 5: Creating a Merge Request in CodeArts Repo

Go to the homepage of the repository where a merge request is to be created, choose Merge Requests > Create MR, and select the source and target branches. The lower part of the Create MR page displays the file differences of the two branches and the commit records of the source branch.

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