Create and manage branches
This page describes how to create and manage branches in a Codeflow repository.
Create branch
A branch is a unit for working on and managing code changes independently. You can create a new branch based on the latest commit of an existing branch or based on a specific commit.
| Creation location | Base point |
|---|---|
| Repository details page | Latest commit of the default branch or selected target branch |
| Commit details page | Selected specific commit |
Created branches are displayed in the branch list on the repository details page and in the reference selector of the Code and Commits tabs.
Create from target branch
Create a new branch based on the latest commit of the default branch or selected target branch.
- Go to the KakaoCloud console > Developer Tools > Codeflow > Repository, then select the target repository.
- In the dropdown at the upper-right of the repository details page, select the Branches tab and click [+ Create].
- In the Create branch popup, enter the branch name and target branch, then click [Create].
Create from specific commit
When you create a branch from a commit details page, the new branch is created based on the selected commit.
- Go to the KakaoCloud console > Developer Tools > Codeflow > Repository, then select the target repository.
- On the repository details page, go to the Commits tab.
- Select the commit ID to use as the base point.
- On the commit details page, click [Create branch] in the upper-right corner.
- In the Create branch popup, enter the branch name and click [Create].
View branch list
In the dropdown at the upper-right of the repository details page, select the Branches tab to search and view branches. Click [View all] at the bottom of the list to view all branches in the View all branches popup.
In the branch list, you can check which commit each branch points to.
| Item | Description |
|---|---|
| Name | Branch name |
| Commit message | Description of the latest commit |
| Commit ID | Unique value that identifies the latest commit of the branch |
| Committed at | Date and time when the latest commit was created |
| [Trash] icon | Delete branch |
Modify default branch
For how to change the default branch of a repository, see Modify repository settings.
Delete branch
In the dropdown at the upper-right of the repository details page, select the Branches tab, then click [View all] at the bottom of the list. In the View all branches popup, find the branch to delete, check the latest commit that the branch points to and related pull request status, then click the [Trash] icon.
- Before deleting a branch, close all related open pull requests.
- To delete the default branch, first unset it as the default branch, then delete it.
- Deleted branches are removed from the branch list. Before deleting, make sure any necessary work is preserved in another branch or commit.