Overview
CodeHub is a distributed version management platform that uses the Git workflow. It provides functions such as security management, member and permission management, branch protection and merge, online editing, and statistical analysis. The service aims to address issues such as cross-distance collaboration, multi-branch concurrent development, code version management, and security.
To start a new project, you can use CodeHub built-in repository templates to create a repository for development. For details, see Starting an R&D Project in the Cloud.
If you are developing a project locally and want to use CodeHub to manage versions, you can migrate the project to the cloud. For details, see Migrating a Local Project to the Cloud.
Starting an R&D Project in the Cloud
You can use repository templates provided by CodeHub to create a project and start development. The following figure shows the workflow.
The operations involved are as follows:
- Creating a Repository Using a Template
- Managing Repository Members
- Cloud Repository Management
- Git Installation and Configuration
- Cloud Repository Clone/Download to a Local Computer
- Managing Branches
- Managing Tags
- Committing Code to the Cloud
- Merge Request Approval
- Forking a Repository
Migrating a Local Project to the Cloud
To manage code versions of a locally developed project using CodeHub, you can bind the local repository to a cloud repository and complete initial push. Then, you can continue developing your project in the distributed version management mode. The following figure shows the workflow.
The operations involved are as follows:
- Creating an Empty Repository
- Managing Repository Members
- Cloud Repository Management
- Git Installation and Configuration
- Associating Cloud Repositories
- Cloud Repository Clone/Download to a Local Computer
- Managing Branches
- Managing Tags
- Committing Code to the Cloud
- Merge Request Approval
- Forking a Repository
Distributed Version Management
There is a complete code repository on your local computer and in CodeHub respectively.
All version information can be synchronized to the local computer for viewing.
You can commit code offline on the local computer and push the code to the CodeHub repository when the network is connected.
Basic Workflow
CodeHub is a cloud repository service that uses the Git workflow.
- Data in a Git local repository can be in one of the three statuses: modified, staged, and committed. The file you modified in the repository is in the modified state. You can run the add command to add the changes to the local staging area. Then, the file is in the staged state. Run the commit command to commit the changes to the local repository for management. The corresponding version and version number are generated upon each commit. You can switch and roll back a version based on the version number. A version can have multiple branches and tags. Each branch, tag, or commit is an independent version that can be checked out using the checkout command.
- As a cloud repository service, CodeHub not only has the basic features of local Git repositories, but also serves as the remote repository of each local repository and provides configurable security policies and authentication.
- A CodeHub cloud repository interacts with a local Git repository in the following scenarios:
- Clone: clones the branch in the remote repository to the local computer as a local repository.
- Push: pushes changes in the local repository to the cloud repository.
- Fetch: fetches a version from the cloud repository to the working directory.
- Pull: fetches a version from the cloud repository to the working directory and tries to merge it into the current branch. If the operation fails, you need to manually resolve the file conflict.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot