A while ago, I was contacted by a user who only accidentially found out about the git plugin I wrote for Dolphin almost a year ago. He pointed out that Google, the magic gate to the internet, did not immediately provide a conclusive answer about the existance of this plugin and how to activate it. This post is about to fix that problem.
So, what to expect from a git plugin for Dolphin? Dolphin is the well-known file manager for KDE and can be used to manage all the files and folder on your computer. If you are a programmer, some of these folders will probably be checkouts of a version control system, such as git or Subversion. There are several actions to interact with these systems, such as adding new files to the repository, making commits or checking out specific versions. The usual way to trigger these actions is via the command line. For convenience, Dolphin offers the most frequently used ones in its context menu, so far for SVN and git. Furthermore, the version control states of the files, such as “added to the repository” or “modified since the last commit”, are indicated for each file with icon overlays.
Enabling the git plugin
To enable this functionality, you first need to install the plugins. They are part of KDESDK, here are some package names for common distributions:
- (K)Ubuntu: kdesdk-dolphin-plugins
- openSUSE: dolphin-plugins
- Arch Linux: extra/kdesdk-dolphin-plugins
- Gentoo: kde-base/dolphin-plugins
Now, you can enable the plugins in the dolphin settings:
After you restart Dolphin, you should see both icon overlays and the new context menu entries whenever you enter a folder that is managed by git.
[Update]Notice that remote access (push / pull) currently only works for authenticated remote repositories and users, i.e. your SSH key must have access to the repository and you should have confirmed the public SSH key of the remote repository on the console before. Password-based login is also not possible at this time.[/Update]
This post is mainly about the git plugin, but there are also other version control systems. The very first plugin to be supported was Subversion (svn), introduced in KDE 4.4. As part of this year’s Google Summer of Code, Vishesh Yadav implemented a plugin for Mercurial, which will be part of KDE 4.8. I also spotted a Bazaar plugin in the KDESDK trunk. So, if you are into programming, be sure to check out the next version of KDE!