How to put disk size quota on a git repository?

I’m using Git as a data storage system, there are multiple users in system and everyone of them has its own git repository.

Is it possible to quota disk usage for Git repository (quota should work on pull-requests, not push-request, server initiates pull-request to pull data from some remote user repository)? A rule like “The /my-app/storage/user-x-repository should be less than 100Mb”? I need it to prevent one user to take extra disk space.

  • git remove branch without removing commits
  • Jenkins and Stash setup ssh key
  • Rebasing a Specific SHA1
  • what's a git equivalent to 'p4 annotate -a'?
  • git fetch - reviewing and modifying incoming changes
  • Git - How do I delete files in upstream repo but not from my fork
  • It is possible to use unix disk quotas per unix-user, but it seems there’s no way to set disk quotas per folder.

    If user reaches its quota – his repository should fail in any way, it’s not important, the important part – “bad user” shouldn’t be allowed to harm other users by taking extra space.

    Is there any way?

  • Recover from wrong commit message ?
  • Get the path where git alias was run from
  • How to tell if github repo ahead of my local git cloned repo
  • Branch a public git repository, on a private git server
  • Git - phantom local commits
  • Git rebase, skip merge-commits
  • One Solution collect form web for “How to put disk size quota on a git repository?”

    Really depends on the OS you are using…

    If linux then you could
    1) Use dd to create an image file of a set size
    2) Create a File System in the image
    3) mount the image to /my-app/storage/user-x-repository
    4) put a mount command in /etc/mtab to make sure this is mounted on reboot

    Windows you would need to find an image mounting tool ..

    Git Baby is a git and github fan, let's start git clone.