tencent cloud

Tencent Cloud DataBuddy

DocumentaçãoTencent Cloud DataBuddyData EngineeringStudio Git Source Code ManagementGit Initialization Configuration, GitFolder Creation, and Source Code Management Operations

Git Initialization Configuration, GitFolder Creation, and Source Code Management Operations

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-10-09 16:12:05
Traduzido por IA
DataBuddy Studio integrates Git source code management: development files can be placed in the Git folder (GitFolder) to maintain bidirectional synchronization with remote Git repositories, enabling version management, multi-user collaboration, and CI/CD. This section describes the Git configuration process and common source code management operations.

Overview

Git integration consists of three levels:
1. Workspace-level Git connection: the administrator configures the connection from the workspace to a remote Git repository, including public or private network connectivity. For details, see Set up a Git connection.
2. Personal Git configuration: each user binds their own Git account Email and access Token in personal settings.
3. GitFolder operations: create a Git folder in the Studio development directory, and the files in the folder are synchronized with the remote repository branch.
After completing the above configuration, you can perform standard Git operations such as commit / push / pull / merge / rebase in the Git Source Control panel on the left side of Studio.

Prerequisites

The workspace has been configured with a Git connection, including the repository URL, Git service provider, branch, and network environment. For details, see Set up a Git connection.
You are a workspace member and have access to the Studio module.
You have the access credentials for the target Git repository, including your personal Email and Personal Access Token.

Operation Steps

Step 1: Complete Personal Git Configuration

1. Go to Workspace > Git Accounts. The page displays the Git repository URL, provider, and branch configured for the workspace, which cannot be modified in personal settings.
2. Fill in the Personal Email and Personal Token fields:
Personal Email: the email address that matches your Git platform account.
Personal Token: a Personal Access Token generated from the Git platform. It must have read and write permissions for the target repository.
3. Click Start Network Connectivity Test. The system uses a Serverless resource group to verify whether your account can access the remote repository.
4. After validation passes, click Save.
Note:
The personal Token is used only when it is saved and is stored in encrypted form. Do not share the Token in plaintext in documents or chat records.

Step 2: Create a Git Folder in the Development Directory

1. After the workspace Git connection is configured, you can create a Git Folder in the Development Directory on the left side of Studio.
2. The content of the Git folder is automatically synchronized with the default branch of the remote repository.
3. You can create subfolders, Notebooks, SQL files, and other files in a Git folder.
4. If you have not completed your personal Git configuration:
When a Git folder is created, the Git repository address is disabled. Hovering over it displays a message: "Please complete your personal Git permission configuration first."
Click the redirect link in the prompt to go to the personal settings page and continue the configuration.

Step 3: Create a File in the Git Folder

1. In Git folder operations, choose Create > Folder / Notebook / SQL / File.
2. Enter a name and click OK. The new object appears under the Git folder, but it has not been committed to the remote repository.

Step 4: Perform Source Code Management Operations

4.1 Go to the Git Source Code Management Panel

1. In the leftmost sidebar of Studio, click the Git Source Control icon.
2. The top of the panel displays the current branch, such as main or feature/abc.

4.2 commit

1. The Changes section in the panel displays the files that have changed, with a status indicator shown next to each file name, for example:
U (Untracked): The file has not been added to the Git index.
A (Added): The file has been staged and is pending commit.
M (Modified): The file has been modified and is pending staging or commit.
1. Select the checkbox next to each file to confirm the files to commit, or click Select All.
2. Enter a description for this commit in the Change Description field at the top.
3. Click Submit.

4.3 push

1. After completing the commit, click Push at the top of the panel.
2. The system pushes the local branch to the remote repository.
3. If the remote repository has new commits, you will be prompted to pull and merge first.

4.4 pull

1. Click Pull at the top of the panel.
2. The system pulls the latest content from the remote repository. If a merge conflict occurs, the system enters the conflict resolution process (step 4.7).

4.5 Switch and Create Branches

1. Click the current branch name to expand the drop-down list.
2. Enter the branch name in the search box:
Select an existing branch to switch to it directly.
Click + Create New Branch: creates a new branch based on the current branch.

4.8 View History

1. Click GRAPH at the bottom of the Git panel.
2. The list displays the commit history of the current branch, including the committer, commit time, and change description.
3. Click a single commit to view the diff of the corresponding files.

Parameter Description

Personal Git Configuration Parameters

Parameter
Description
Required
Default Value
Personal Email
Email address consistent with the Git platform account, used as the commit author.
Yes
None
Personal Token
Personal Access Token from the Git platform, which must have read and write permissions to the target repository.
Yes
None

File Status Indicators

Label
Description
U
Untracked, not yet added to the Git index
A
Added, staged and ready to commit
M
Modified, file has been changed
D
Deleted, file has been removed
C
Conflict, merge conflict exists

Use Limits

Files under GitFolder do not support individual file ACL authorization, and all project members have management permissions by default. For details, see File Permissions.
The number of files per commit and the size of a single file are limited by the Git platform and underlying services. It is recommended to keep a single file smaller than 10 MB.
After files in a Git folder are modified, local changes may be inconsistent with the remote version. commit & push regularly to avoid conflicts.
Git configurations in different workspaces are independent and cannot be shared across workspaces.

FAQs

Q1: The connectivity test failed with "authentication failed"?
Check whether the Personal Access Token has expired.
Confirm that the Token has read_repository / write_repository permissions on the target repository.
In VPC mode, confirm that the endpoint service ID is configured correctly. For details, see Set Up Git Connection.
Q2: Why does the file not appear in the change list when committing?
Confirm that the file is in a Git folder. Changes in local folders will not be committed to Git.
Check whether the file is excluded in .gitignore.
Click the Refresh button on the Git panel to rescan changes.
Q3: Why does pushing show "rejected: non-fast-forward"? The remote repository already has new commits. Click Pull to merge remote updates, resolve any potential conflicts, and then push.
Q4: Can accidentally deleted files still be recovered?
If you have not committed yet, click the file in the Changes area of the Git panel and then click Discard Changes to restore it.
If you have already committed & pushed, find the corresponding commit on the Git platform and perform a revert, or switch back to the previous commit from the history.
Q5: Is SSH key authentication supported? The current version supports only Personal Access Token authentication.

References

Ajuda e Suporte

Esta página foi útil?

comentários