forum/is there a way to only commit some files in direct-mode ?git-annexhttp://git-annex.branchable.com/forum/is_there_a_way_to_only_commit_some_files_in_direct-mode___63__/git-annexikiwiki2013-12-13T06:16:12Zcomment 1http://git-annex.branchable.com/forum/is_there_a_way_to_only_commit_some_files_in_direct-mode___63__/comment_1_804e43111ee97dff15e49e50b6c29d91/joeyh.name2013-12-12T17:01:53Z2013-12-12T17:01:50Z
<p>You can <code>git annex add</code> some files and leave others not added, and <code>git annex sync</code> will commit only the added ones.</p>
<p>What is missing is a way to have changed some files that were added, and avoid <code>git annex sync</code> committing them.</p>
<p>There is no technical reason this cannot be supported in direct mode, there is just no user interface built to do it.</p>
<p>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 <code>git commit -a</code> etc).</p>
comment 2http://git-annex.branchable.com/forum/is_there_a_way_to_only_commit_some_files_in_direct-mode___63__/comment_2_299ad6cd0225daa166d36af3726a9ef2/Renaud2013-12-13T06:16:12Z2013-12-13T06:16:12Z
<p>Thanks for the reply!</p>
<p>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...</p>
<p>Is there a simpler way to sync with a remote repository?</p>