Reputation: 7868
I need to setup a git repository on a place that has restrictions on the filetypes and contents. Of course, that could become a pain for synchronizing so I could overcome that limitation by archiving the repository.
However, archiving the repository would make the archive to be just that: an archive or a file without repository posibilities.
I wonder, is there any way to make git interact with an archived repository (let's say, a .zip file) as a full functional repository, with the only difference that it is contained in a different file system structure?
I would love to be able to do something like this, if possible at all:
git clone /myRepo /otherlocation/repo.zip
# myRepo is a directory with all the files
# repo.zip is a compressed zip file
# could git treat both as repositories anyway -- any approach?
I would like to be able to perform other clones, pushes and pulls to this archive, as a way to sync different local repositories with this restricted location I have.
Background:
I need to work on a project and I haven't been given any place to host my repositories. For the moment, I'm working with a local copy of a git repository I created, but I would like to have that synced in a real server. As I haven't been given any place to put my code, I am thinking in using a Sharepoint folder for documentation regarding the project. Sharepoint does provide limitations on the type of files I can post to it, and I can have the server set up so I can access it's document library as an UNC path.
However, I can overcome the filetypes limitation by archiving everything into a .zip file and uploading it. Instead of doing all of that manually every time, I would like to see if git (or anything else) can take care of that for me.
Upvotes: 0
Views: 221
Reputation: 28096
I would periodically (perhaps once a week) git bundle
your local repository and put the resulting file somewhere on the sharepoint server. I would make each bundle a full repository and keep the last couple as backups too keep things simple, rather than using git bundle
's incremental features.
Upvotes: 1