Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.
- Service Overview
- Getting Started
-
User Guide
- Overview
- Git Installation and Configuration
- Setting SSH Key or HTTPS Password for CodeArts Repo Repository
- Migrating Data to CodeArts Repo
- Creating a CodeArts Repo Repository
- Associating the CodeArts Repo Repository
- Cloning or Downloading Code from CodeArts Repo to a Local PC
- Using CodeArts Repo
- Configuring CodeArts Repo
- Submitting Code to the CodeArts Repo
- More About Git
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs
- SSHKey
-
Repository
- Obtain files in the branch directory.
- Obtaining Warehouse Statistics
- Obtains image files of a specific branch in a repository.
- Modifying the Status of a Repository Referenced by a Pipeline
- Checks whether a user has the warehouse administrator permission.
- Sets whether a repository is in public or private state.
- Obtains the content of a specified file in a specified branch of a repository.
- Obtaining the List of Public Sample Templates
- Creating a repository
- Obtain the short ID of the repository based on the repository name and group name to combine the short ID with the URL of the submission details page corresponding to commitid.
- Queries the submission of a branch of a repository based on the group name and repository name.
- Querying the Branch of a Warehouse
- This API is used to query the submission of a branch of a warehouse based on the warehouse ID. More optional parameters are provided.
- Adding a Deployment Key
- Deleting a Repository Deployment Key
- Obtains the last submission statistics of the warehouse.
- Repository Statistics
- Delete repositories
- Check the repository creation status.
- Querying the Tag List of a Warehouse
- Adding a Tag
- Querying the Details of a Warehouse
- Obtains the number of submitted code lines.
- Download Repository
- Creating a Protection Branch
- Obtaining the Repository Branch List
- Obtaining the List of Warehouse Combination Requests
- Obtaining Warehouse Combination Request Details
- V2Project
- RepoMember
- Commit
- File
- User
- WebHook
- Project
- V2 Warehouse Management
- Discussion
- Application Examples
- Appendix
-
FAQs
-
Managing Repositories
- How Can I Set Multiple SSH Keys on My Computer?
- How Can I Prevent Unauthorized Code Replication?
- How Do I Upgrade TLS?
- Should I Set a Public SSH Key for Each Repository?
- Can All Users Upload and Download Code with the Same SSH Key?
- Will the System Remove Deleted Project Members from Repositories and SSH Keys Created by Them?
- How Can I Make a Repository Private or Public?
- SSH Function Upgraded
- Using Repositories
- Migrating Repositories
-
FAQs
- Why Can't I View Repositories Created by Other Project Members?
- Is There Any File Size Limit in Repositories?
- Can I Export the Statistics on Code Lines Committed by Members?
- How Do I Prevent Files Containing Secrets from Being Pushed to a Repository?
- Why Can't I See the Repository Synchronization Tab?
- Will Related Git Code Branches Be Automatically Deleted When the Creator of a Git Branch Is Deleted?
- What Do I Do If a Binary File Fails to Be Pushed to CodeArts Repo?
-
Git Issues
- How Does Git Identify Repository Administrators?
- How Do I Obtain the Path Where Downloaded Code Is Stored?
- How Do I Obtain the Code Repository Address?
- What Are Repository URLs Used for?
- Does CodeArts Repo Support SVN?
- Can I Decompress a Compressed Package Uploaded to a Cloud Repository?
- How Do I Clear, Save, and Change the Username and Password in Git?
-
Troubleshooting
- Private Key Is Lost
- SSH Key Already Exits
- Git Keeps Asking for Passphrase During Code Clone via SSH
- Password Incorrect During Code Clone via HTTPS
- Committed Files Cannot Be Found in the Cloud Repository
- Message "pathspec XXX did not match any files" Is Displayed
- Message "Transport Error: cannot get remote repository refs. XXX.git: cannot open git-upload-pack" Is Displayed
- Message "syntax error near unexpected token `newline'" Is Displayed
- Message "unable to auto-detect email address" Is Displayed
- Message "fatal:Authentication failed" Is Displayed
- Message "'origin' does not appear to be a git repository" Is Displayed
- Message "You are not allowed to push code to protected branches on this project" is Displayed
- Message "Not a git repository" Is Displayed
- Message "src refspec master does not match any" Is Displayed
- Message "destination path 'XXX' already exists and is not an empty directory" Is Displayed
- Message "The requested URL returned error: 401" Is Displayed
- Code Push Fails
- Code Pull Fails
- Message "fatal: refusing to merge unrelated histories" Is Displayed
- Message "SSL certificate problem" Is Displayed
-
Managing Repositories
Show all
GitFlow
GitFlow is commonly seen in large-scale development projects. Each branch is dedicated to a specific purpose and policies are made to regulate the interaction between branches. The following figure shows the process of GitFlow.
Process
- Master branch
The master branch is the production branch where code is ready to deploy. It is the most stable branch because changes cannot be directly pushed to it. Developers can only merge other branches to the master branch. It is often set as a protected branch by default, on which only the project maintainer can operate.
- Hotfix branch
It is a temporary branch created off the master branch for fixing urgent bugs in a live production version. After the bug is fixed, the hotfix branch gets merged into the master branch and tagged with a version number. The bug fix also needs to be merged to the develop branch.
- Develop branch
A develop branch is pulled from the master branch and used to merge features. It contains all the code ready to release for integration and system testing.
- Release branch
When a new release is coming up, developers create a release branch from the develop branch for release preparations, such as fixing minor bugs and producing documents. Adding new features is not allowed. They should be merged into the develop branch and wait for the next release. When the preparation is complete, the release branch is merged into the master branch and the commit is tagged with a version number. The changes made in the release branch also need to be merged to the develop branch.
- Feature branch
Feature branches are pulled from the develop branch for feature development. When the development is complete, they are merged into the develop branch. Feature branches do not interact with the master branch.
Developers add new features in either of the following ways:
- Integrate features after reviewed by a dedicated approver.
- Developers push feature branches to the central repository in CodeArts Repo.
- Developers then create merge requests for merging the feature branches into the develop branch, and assign the requests to the reviewer.
NOTE:
CodeArts Repo supports MRs. You can choose source branches and target branches. Only repository administrators (project managers, repository creators, and developers granted with repository management permissions) can accept MRs.
- The approver reviews the merge requests. If the requests are approved, the feature branches are merged into the develop branch and deleted. Otherwise, the approver should explain the reasons of rejections.
- Integrate features after self-reviews.
- Developers merge feature branches to the develop branch in the local repository and delete the feature branches.
- The local develop branch is then pushed to the central repository in CodeArts Repo.
Advantages
- With a branch dedicated for release preparation, a development team can develop new features for a future release on the develop branch while improving the version for the upcoming release. Release is visualized, which means team members can have a clear view of the release status in commit graphs.
- Hotfix branches, which can be seen as temporary release branches created off the master branch, enable development teams to fix urgent bugs without interrupting other works. You do not have to wait until next release but can quickly deploy fixes to the production version.
- Effective multi-branch mechanism allows for organized development process especially for large-scale projects.
- This workflow is more in line with the DevOps philosophies.
Disadvantages
- High learning thresholds.
- Impact will be greater if development teams do not comply with their specified workflow policies.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.