However, I also have gigabytes of data that I don't want to have in the open and in the repo - they are big, they are proprietary, they are "burdened" with copyrights and so on. However, I have not tested this any further to ensure that git annex ignores the url and uses only the annex-rsyncurl entry when operating with annexed files.I have a git repository with source codes I want to put in the open on github. git/config with both a url= (for the normal git operations) and a annex-rsyncurl=. Git remote add server-c annex initremote server-c type=rsync rsyncurl=:/rsync/user encryption=noneįor me this results in a single remote in. The following commands appear to create a sensible. It may be possible to point a single remote to both locations, however I'm not sure if this is actually supported. In particular you just have to remember to use the special remote (server-c-rsync) when using the -to= or -from= arguments of get, copy, and move. The only downside is that you have 2 different remote names that really point to the same server. This should get you the basic functionality that you're looking for. You should be able to set this up with something along the lines of: git remote add server-c annex initremote server-c-rsync type=rsync rsyncurl=:/home/user/annex-rsync encryption=none Url = refs/heads/*:refs/remotes/server-c/*Īnnex-rsyncurl = :/home/user/annex-rsync The second remote is an annex special remote. The first remote (server-c) is a regular git remote for synchronizing your history and anything that is checked directly into the git repo. Basically, you'll end up with 2 separate remotes, both pointing to different locations on server-c. It looks like you've already read up on all of the tools you'll need. These could also be decoupled and stored on any number of different servers. With git and rsync access to the same server you can use that server to store both the history (via git access) and the annex key-value store (via rsync access). size 5M -type f -not -ipath \*.git/\* -print0 | xargs -0 git annex addįind all files larger than 5MB in the repo and add them to the annex git directory) and remove them from the index.įind. ![]() size 5M -type f -not -ipath \*.git/\* -print0 | xargs -0 git rm -cached įor each commit, find all files larger than 5MB in the repo (minus the. Rewrite trees for all commits reachable from HEAD.įind. Step by step, what that hopefully does is: size 5M -type f -not -ipath \*.git/\* -print0 | xargs -0 git annex add' HEAD size 5M -type f -not -ipath \*.git/\* -print0 | xargs -0 git rm -cached find. I haven't tested this myself since I don't have git-annex installed, so you should clone your repo and test it there first! git filter-branch -tree-filter 'find. That command would probably look something like the following. You might be able to use git-filter-branch to rewrite your commits to remove the big files and annex them, as if they had been there all along. This is because your history still contains all the big files checked into Git. If you just remove the files from the most recent commit and start using git-annex now, it will work, but your existing git repository will not get any smaller. Also, the documentation is pretty hard to read. I have the data on one computer only and I don't think I will be moving them soon (it's nice to have the possibility, but it's not why I want to use git annex). I have tried to read the official documentation but it talks about use cases that I don't care about. How exactly should I use git annex for my scenario? Meaning – which commands should I use and how? However, I have read about git-annex and it seems it can do what I want. Right now, I have them in the directory "data" in the repository and I have the directory ignored and I resign on getting them to git. However, those are also logically "part of the same project" and I wish to have some control over their history (basically, what git already does). However, I also have gigabytes of data that I don't want to have in the open and in the repo – they are big, they are proprietary, they are "burdened" with copyrights and so on. ![]() ![]() ![]() I have a git repository with source codes I want to put in the open on github.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |