I would like to be able to use git-annex to not only sync binary files for a project but also to be able to use it more like git, that is adding manually files to index and only commiting that. I think it is still possible in indirect-mode to manage files like I want, but as I am stuck in windows, I would like to be able to do that in direct-mode... Due to the safety measures taken to avoid doing bad things in direct-mode, it doesn't seem possible to commit (and push) files without syncing the whole repository.
Is it currently possible to do what I would like to do, or will it be possible in the future ?
You can
git annex add
some files and leave others not added, andgit annex sync
will commit only the added ones.What is missing is a way to have changed some files that were added, and avoid
git annex sync
committing them.There is no technical reason this cannot be supported in direct mode, there is just no user interface built to do it.
One way is to temporarily bypass the direct mode guard, by using the appropriate git command line option to set core.bare=false temporarily while committing files. Note that it's then up to you to avoid staging the entire content of the file into the index (so no
git commit -a
etc).Thanks for the reply!
I tried to commit manually but I got confused by the (recently introduced?) annex/direct/master branch and I am not sure which branch I need to commit/merge/pull/push my changes to. I also got blocked when pulling from origin fail due to file changes needed to be overwritten. I see git-annex cleverly merges those in .git/annex/merge folder so I could try doing the same but I am not too confortable doing a large part of git-annex's job...
Is there a simpler way to sync with a remote repository?