summaryrefslogtreecommitdiff
path: root/doc/forum/syncing_non-git_trees_with_git-annex/comment_1_7f9593bdfd95e4a8814e6cc5c44619e6._comment
blob: c1b9cfa37069c314ea1336f991c5b685c864f020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[[!comment format=mdwn
 username="http://joey.kitenet.net/"
 nickname="joey"
 subject="comment 1"
 date="2011-12-14T17:31:31Z"
 content="""
This is an entirely reasonable way to go about it.

However, doing it this way causes files in B to always \"win\" -- If the same filename is in both repositories, with differing content, the version added in B will superscede the version from A. If A has a file that is not in B, a git commit -a in B will commit a deletion of that file.

I might do it your way and look at the changes in B before (or even after) committing them to see if files from A were deleted or changed.

Or, I might just instead keep B in a separate subdirectory in the repository, set up like so:

<pre>
mv b old_b
git clone a b
cd b
mv ../old_b .
git annex add old_b --exclude --not '*.avi'
</pre>

Or, a third way would be to commit A to a branch like branchA and B to a separate branchB, and not merge the branches at all.
"""]]