diff --git a/doku2git.py b/doku2git.py index fca21d5..d285b62 100755 --- a/doku2git.py +++ b/doku2git.py @@ -253,7 +253,15 @@ class MediaChange(Change): localpath = self.page.replace(':', os.path.sep) localdir = os.path.dirname(localpath) - yield f'cp "{self._attic(src)}" "{os.path.join(dst, localdir)}"' + dstpath = os.path.join(dst, localdir) + + cmds = [ + f'cp "{self._attic(src)}" "{dstpath}"', + f'git add "{dstpath}"' + ] + + for c in cmds: + yield c ###############################################################################