File: local_subtree_and_broken_symlinks.mdwn

package info (click to toggle)
git-annex 10.20250416-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 73,572 kB
  • sloc: haskell: 90,656; javascript: 9,103; sh: 1,469; makefile: 211; perl: 137; ansic: 44
file content (21 lines) | stat: -rw-r--r-- 1,007 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Here's a simple example on a repository with three branches, where we'll be adding images-annex as a subtree into master.

    $ git branch
        git-annex
        images-annex
      * master
    $ git subtree add --squash --prefix=images/ images-annex
      Added dir 'images'
    $ ls
      FILE_A        FILE_B        images/

...checkout images-annex, make changes, commit...

    $ git checkout master
    $ git subtree pull --squash --prefix=images/ . images-annex
      From .
      * branch images-annex -> FETCH_HEAD
      Merge made by the 'recursive' strategy.
      ...(files created/modified/etc)

I have tried a few different methods for merging the subtree in and so far have not been able to keep git-annex links up to date. Running `git-annex fix .` does what it's supposed to but then git sees everything as modified. Is this entirely the expected behavior because of the --prefix? I have not used subtrees much before but the model appears to be very helpful for what I'm trying to do.