This topic describes how to manage contents in a Git repository.
Background information
Git is an open-source distributed version control system that can effectively manage the versions of projects, ranging from small to large. The Git integration in OceanBase Cloud provides fundamental branch management capabilities.
Prerequisites
You have cloned the target repository. For more information, see Manage Git repositories.
Branch management
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Data Development, and then click the name of the target workspace.
Click Git Repositories on the left, and select the target repository.
Go to the Git integration page of Data Development. The following sections describe some common operations in Git integration.
Create a branch
Click the branch name in the upper-left corner of the data development page. In the drop-down box, click Create Branch.
In the create branch window, enter the branch name and click Create.
Switch branches
Click the name of the current branch in the upper-left corner of the data development page and select the target branch from the drop-down list.
Pull the branch
Hover the mouse over the menu on the right side of the branch name in the upper-left corner of the data development page. In the pop-up menu, click Pull to fetch the latest list of branches from the server repository.
Edit content
Select the target branch and edit the content.
Edit the directory.
You can create a file or folder by clicking the + button.
You can create files or folders, rename files or folders, and delete files or folders by using the menu on the right side of the directory.
Rename and delete files by using the menu on the right side of the file.
Edit the file content.
In the directory, select the target file for content editing. After editing, click the save button in the upper-left corner to save the changes in the local branch.
After you edit the content of a local branch, you can submit the branch to push the changes to the remote branch.
Commit the branch
After the content is edited, hover the cursor over the menu on the right side of the branch name in the upper-left corner of the page. In the dialog box that appears, click Submit.
Check the content updates and fill in the submission information. Then, click Submit to submit the changes and push them to the service-side branch.
Switch workspaces
Click the name of the current workspace in the upper-left corner of the data development page and select the target workspace from the list.
Switch repositories
Click the name of the current Git repository in the upper-left corner of the data development page and select the target repository from the list.
FAQ
503 error when pulling/pushing branches
During the Git integration, a 503 error may be returned due to a network timeout. Make sure that your network connection is stable. If the problem persists, try again later.