Manage a Git Repository

After you’ve created a Git repository, you can edit its description, set its default branch, index it, and delete it but you cannot change its name:

Action How To

Edit a Git repository’s description

On the Git page, from the Repositories drop-down list, select the Git repository. In the Files or Logs view, click the repository description to edit it.

Alternatively, on the Project Settings: Repositories page , mouse over the Git repository name, click Menu Menu , and select Edit Edit . In the Edit Repository dialog box's Description field, enter or edit the repository description, and click Update.

Set the default branch

When you open a Git repository on the Git page, the contents of the default branch are displayed. By default, the main branch of a Git repository is set as the default branch. However, you can set any branch to be the default branch of a Git repository.

On the Project Settings: Repositories page , mouse over the Git repository name, click Menu Menu , and select Edit Edit . From the Edit Repository dialog box's Default Branch drop-down list, select the branch, and click Update Update .

Index a Git repository

Indexing a Git repository creates or updates the Git repository index file with the latest changes. A Git index file is a binary file that serves as a virtual staging area for the next commit. This file contains a sorted list of object path names, each with a blob object's permissions and the SHA-1.

To index a repository, on the Project Settings: Repositories page , mouse over the Git repository name, click Menu Menu , and select Index Index .

Delete a Git repository

On the Project Settings: Repositories page , mouse over the Git repository name, click Menu Menu , and select Delete Delete . In the Remove Repository dialog box, click Yes.