git-annex/ tips/ file manager integration

Integrating git-annex and your file manager provides an easy way to select annexed files to get or drop. The file manager can also be used to undo changes to file managed by git-annex.

## GNOME (nautilus)

Recent git-annex comes with built-in integration for Nautilus.

This is set up by git-annex creating simple scripts in `~/.local/share/nautilus/scripts`, with names like "git-annex get"

## KDE (Dolphin/Konqueror)

Even more recent git-annex comes with built-in integration with Konqueror.

This is set up by git-annex creating a `$XDG_DATA_HOME/kservices5/ServiceMenus/git-annex.desktop` file.

## Xfce (Thunar)

Xfce uses the Thunar file manager.

Install https://pypi.org/project/thunar-plugins/ to use its integrated git-annex support.

Alternatively, thunar can also be easily configured to allow for custom actions. Just go to the "Configure custom actions..." item in the "Edit" menu, and create a custom action for get, drop, and undo with the following commands:

    git-annex drop --notify-start --notify-finish -- %F

for drop, and for get:

    git-annex get --notify-start --notify-finish -- %F

and for undo:

    git-annex undo --notify-start --notify-finish -- %F

This gives me the resulting config on disk, in `.config/Thunar/uca.xml`:

    <action>
        <icon>git-annex</icon>
        <name>git-annex get</name>
        <unique-id>1396278104182858-3</unique-id>
        <command>git-annex get --notify-start --notify-finish -- %F</command>
        <description>get the files from a remote git annex repository</description>
        <patterns>*</patterns>
        <directories/>
        <audio-files/>
        <image-files/>
        <other-files/>
        <text-files/>
        <video-files/>
    </action>
    <action>
        <icon>git-annex</icon>
        <name>git-annex drop</name>
        <unique-id>1396278093174843-2</unique-id>
        <command>git-annex drop --notify-start --notify-finish -- %F</command>
        <description>drop the files from the local repository</description>
        <patterns>*</patterns>
        <directories/>
        <audio-files/>
        <image-files/>
        <other-files/>
        <text-files/>
        <video-files/>
    </action>

The complete instructions on how to setup actions is in the Xfce documentation.

## OS X (Finder) Full Integration

Download and install the git-annex-turtle app (beta software). Provides Finder integration, badges and context menus.

## OS X (Finder) Context Menus

For OS X, it is possible to get context menus in Finder. Due to how OS X deals with symlinks, one needs to operate on folders.

1. Open Automator and create a new Service.
2. Using the Drop down menus in the top create the sentence "Service receives selected folders in Finder.app" to have it work on folders. For direct mode operation it is probably reasonable to select "files or folders".

3. Add a "Run shell script" element and fill in line with the following script:

        #!/usr/bin/bash
        source ~/.bash_profile
        for f in "$@"
        do
            cd "$(dirname "$f")" && git-annex get "$f"
        done

The purpose of the first line is there to get git-annex on to the path. The reason for the for loop is in case multiple files or folders are marked when running the context menu command.

Finally save the the workflow under the name for which it should be listed in the context menu.

## your file manager here

Edit this page and add instructions!

## general

If your file manager can run a command on a file, it should be easy to integrate git-annex with it. A simple script will suffice:

    #!/bin/sh
    git-annex get --notify-start --notify-finish -- "$@"

The --notify-start and --notify-stop options make git-annex display a desktop notification. This is useful to give the user an indication that their action took effect. Desktop notifications are currently only implemented for Linux.

comment 3
for some reason this doesn't work in gnome2. i had to add the shortcuts in /usr/share/nautilus-scripts (iirc). --anarcat
Comment by https://id.koumbit.net/anarcat — Wed Oct 29 14:05:27 2025
comment 2
@Carl, I've fixed the formatting. To add a picture, you'd need to send me a pull request adding it to the git repo.
Comment by http://joeyh.name/ — Wed Oct 29 14:05:27 2025
Finder added
For some reason I do not manage to get the shell script to pretty print. I can also supply a screenshot of the Automator, but do not manage to upload it to the wiki.
Comment by https://www.google.com/accounts/o8/id?id=AItOawnmF_9CAtfqdZkC4e-_dCX-rK5bqh4RWkw — Wed Oct 29 14:05:27 2025
Comments on this page are closed.