Hi, I'm working on a game project (Unity3D) which I want to use git-annex for all those binary assets,
but I still want to be able to commit normal code files in git,
is there a way to do that?
below is what I tried (but failed) to do.
Thanks.
Chris
C:\Users\Chris\Projects\testing>git annex init "testing"
init testing
Detected a filesystem without fifo support.
Disabling ssh connection caching.
Detected a crippled filesystem.
Enabling direct mode.
ok
(recording state in git...)
C:\Users\Chris\Projects\testing>echo test > testing.txt
C:\Users\Chris\Projects\testing>git add testing.txt
fatal: This operation must be run in a work tree
Have you tried the
git annex proxy --
command? Another way might be to just bypass the annex checks withgit -c core.bare=false
. Check http://git-annex.branchable.com/direct_mode/ for details.if I use
git annex proxy
I can't see the changes:and I noticed that I'm on a branch called
annex/direct/master
, not themaster
I'd expect...if I use
git -c core.bare=false
, I get the normal output:but I'm still on a "wrong" branch? what is this
annex/direct/master
branch and am I supposed to commit and push this branch?Thanks, Chris
One nice way to do this is to use the annex.largefiles configuration setting. With a recent version of git-anne (5.20150409 or newer), adding a file that doesn't match annex.largefiles will cause it to be checked into git, rather than annexed.
So, for example,
git -c annex.largefiles='exclude=*' annex add foo
will temporarily configure it to not annex any files, and add file foo to git. Or you can set annex.largefiles more permanantly to match specific file extensions.As to the annex/direct/master branch, this branch will get merged into the master branch on a push, so don't worry about it.
(The
-c core.bare=false
approach will also work, just run regular git commands to add the file and commit. But, it's best to avoid this approach, because it's very easy to shoot yourself in the foot, by eg usinggit commit -a
with it, which will check all file contents into git.)