Backlog 101: Git

Git is a distributed version control system used by developers to efficiently manage source code. In Backlog, Git helps teams track change history, work on code simultaneously, and link code updates to project issues.

In this overview, we’ll go over how to:

  • Enable Git
  • Access Git 
  • View repository size
  • Manage Git size

Only project admins can manage Git settings. If you’re new to Git, check out our guide for beginners.

Enable Git

To enable Git:

  • Go to the project.
  • Select “Git” from the menu on the left.
  • Select “Enable Git.”

Once enabled, you can create multiple Git repositories for each project (unlike Subversion repositories).

Access Git

Once Git is enabled, project members without restrictions can access all Git repositories via the “Git” project page.

To access the Git repositories via SSH or HTTPS, the typical URLs are:

Via HTTPS

  • Enter your Backlog login info. If you’re using two-factor authentication, enter the special password generated in your Backlog personal settings.

Via SSH

  • Generate a SSH public key.
  • Register the key in your Backlog personal settings.
  • Use [Space ID]@[Space ID].git.backlog.com:/[Project key]/[Repository name].git

View repository size

To view the total size of the repositories within a project:

  • Select your profile icon in the global navigation.
  • Select “Space settings.”
  • Select “Disk usage.”

To view the size of a single repository in that project, use the following terminal commands: 

  1. Clone your repository
    git clone [https url of your repository]
  2. Change your current working directory to the repository
    cd [directory of your repository]
  3. Pull all remote branches to your local repository
    git pull
  4. Check the size of the .git directory
    du -sh .git 

Manage Git size

Large files or a large repository can cause issues with push, clone, and other commands. To prevent this, we set size limits for files and repositories. 

The maximum file size is 100MB, and you’ll receive an error if a file in the Git push exceeds it. To resolve this, remove the file from your local commit or consider using Git LFS. Note that deleted files remain in the Git commit history, so the size of the repository isn’t reduced.

The maximum repository size is 10GB, and you’ll get warnings when the repository reaches 1GB, 5GB, and 10GB. Once it reaches 10GB, it’s put into read-only mode and push commands are rejected. To resolve this, create a new repository with a copy of your latest commit with these terminal commands: 

  1. Set the URL of the current repository
    src_repo=${[ the URL of current repository ]}
  2. Clone with --depth 1 option
    git clone --depth 1 ${src_repo}
  3. Change your working directory to the repository
    cd <the directory of the repository>
  4. Set the latest commit message
    from_commit=$(git log -1 --pretty=%H)
  5. Delete .git directory
    rm -rf .git
  6. Initialize your repository
    git init
  7. Add all file to Git
    git add .
  8. Commit with the comment of the latest commit message
    git commit -m "from ${src_repo} ${from_commit}"
  9. Set the URL for the new repository
    git remote add origin <new url of repository>
  10. Push to the new repository
    git push origin main
1 people think that it is helpful. Was this helpful for you?

Have a question we didn't answer?

Contact support