Skip to content

Instantly share code, notes, and snippets.

@gregjhogan
Created September 25, 2019 21:43
Show Gist options
  • Select an option

  • Save gregjhogan/d9ec1810338bafff972ff61e568ba1eb to your computer and use it in GitHub Desktop.

Select an option

Save gregjhogan/d9ec1810338bafff972ff61e568ba1eb to your computer and use it in GitHub Desktop.
git repo backed by azure blob storage
# create public azure storage account <account> with container 'git-test'
az storage account create -n <account> -g <resource-group> -l <region> --sku Standard_LRS
az storage container create --account-name <account> -n git-test --public-access blob
# create a
mkdir git-test && cd git-test
git init
echo "Hello World!" > test.txt
git add test.txt && git commit -m 'initial commit'
# run every time you push something new
# create or update info/refs and objects/info/packs (normally generated by server)
git update-server-info
cd .git
for f in $(ls); do azcopy copy $f "https://<account>.blob.core.windows.net/git-test/?<sas-token>" --recursive; done;
# test it out
cd .. && mkdir test && cd test
git clone https://<account>.blob.core.windows.net/git-test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment