Wiki

Clone wiki

powergit / Git LFS

Git Large File Storage (LFS) is an open source Git extension for versioning large files. More information can be found in GitHub Git LFS

Instructions

  1. Enable Git LFS in PowerGit admin page, select either use storage provided by PowerGit or use your own S3
  2. Once Git LFS is enabled, there will be a URL displayed in the PowerGit admin page e.g. https://lfs:OmtaEt303v6KbGOcgmbvdmTqKStnz6eN@lfs.powergit.com/power-git/powergit
  3. Follow the instructions in Git LFS to setup repository
  4. Config .gitconfig file to include the following configuration, more information can be found Here
    [lfs]
      url = "https://lfs:OmtaEt303v6KbGOcgmbvdmTqKStnz6eN@lfs.powergit.com/power-git/powergit"
      batch = true
    

If you are using your own S3

  1. Create a new bucket
  2. Create a new Access Key and Secret Key and attach the suggested policy (only allow upload and download objects in the specific bucket)
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "s3:GetObject",
                    "s3:PutObject"
                ],
                "Resource": [
                    "arn:aws:s3:::BUCKET_NAME/*"
                ]
            }
        ]
    }
    
  3. Provide Access Key, Secret Key, Bucket Name, Region when enable in the PowerGit admin page

Example

An example repository lfs-demo has been setup as a demo to use PowerGit Git LFS. The .gitconfig file example can be found here

To clone this repository, use the following commands (make sure git-lfs has already been installed)

git clone https://bitbucket.org/power-git/lfs-demo.git
cd lfs-demo
git lfs pull

Then you will be able to see test.zip as a normal zip file.

FAQ

Is there any storage and bandwidth limit?

For storage provided by PowerGit, there are storage and bandwidth limit depending on the plan you choose. View the Pricing page for more detail.

If you are using your own AWS S3, the storage and bandwidth usage will be charged by AWS S3. Your upload and download traffic will goes to S3 directly.

Updated