Do you work with Git a lot? Use Gnome Shell? If so, it may be worthwhile to integrate Git with the Gnome file manager. You can do so by installing the Git plugin for Nautilus which has dozens of features that developers will love. With it, you’ll be able to access remote code repositories, quickly commit code instantly, and more!
Install RabbitVCS Git extension
Nautilus Git integration is made possible because of RabbitVCS. It’s a bundle of software that includes many useful VCS (version control) integrations for the Linux desktop. In this tutorial, we’ll mainly be focusing on getting the Gnome file manager plugin they develop working. If you’re interested in using more than just the file manager extension, consider checking out their website.
To install the RabbitVCS Git extension into Nautilus, close your file manager. Then, open up a terminal window and follow the instructions that match the Linux operating system that you use.
Note: do you use another file manager? RabbitVCS has an equivalent Git extension for many of other Linux file manager as well! Get it here.
The RabbitVCS Git extension is available on Ubuntu, via the Universe software repository. To install it, do:
sudo add-apt-repository universe sudo apt install rabbitvcs-nautilus
Those on Debian Linux can get the RabbitVCS Git plugin for the Nautilus file manager for versions 7,8 and 9 via the Apt-get command.
sudo apt-get install rabbitvcs-nautilus
To install the RabbitVCS Git extension for Nautilus on Arch Linux, you must build the unofficial AUR package, as the maintainers of Arch Linux have chosen not to include it in the official software sources. Follow the steps below to get it going!
Step 1: Install both Git and Base-devel, so that your Arch PC can interact with the AUR and install packages manually.
sudo pacman -S git base-devel
Step 2: Clone the RabbitVCS Git extension’s snapshot from the AUR with the git clone command.
git clone https://aur.archlinux.org/rabbitvcs-nautilus.git
Step 3: Clone and build the RabbitVCS AUR package, as well as it’s dependencies, as they’re necessary to get the Nautilus extension working.
git clone https://aur.archlinux.org/python2-pysvn.git cd python2-pysvn makepkg -sri cd .. git clone https://aur.archlinux.org/python2-dulwich.git cd python2-dulwich makepkg -sri cd .. git clone https://aur.archlinux.org/rabbitvcs.git cd rabbitvcs makepkg -sri cd ..
Step 4: Move the terminal window into the newly cloned rabbitvcs-nautilus code folder using the CD command.
Step 5: Build and install the RabbitVCS Git extension for Nautilus using the makepkg command.
Need the RabbitVCS Git extension for your Fedora Linux PC? Open up a terminal and use the DNF command to install it to the system!
sudo dnf install rabbitvcs-nautilus -y
OpenSUSE is the only mainstream Linux distribution that chooses not to distribute the RabbitVCS Nautilus Git extension in their software sources. As a result, SUSE users must build it from source. Launch a terminal and install the following dependencies, then skip to the source code instructions to get it working.
sudo zypper install python-nautilus python-gtk python-gtk-devel python-pysvn dbus-1-python dbus-1-python-devel python-dulwich subversion meld
Installing RabbitVCS on Linux distributions that do not directly support the plugin is quite easy. To start, open up a terminal window and download the latest Tarball release with the wget downloader tool.
Extract the RabbitVCS archive using the tar command.
tar -zxvf v0.16.tar.gz
Read the RabbitVCS dependency page and install all of the packages it calls for on your Linux OS. When the dependencies are taken care of, move the terminal window into the code folder with the CD command.
Install RabbitVCS to your PC with:
sudo python setup.py install
Access Git in Nautilus
Installing the RabbitVCS extension for Nautilus doesn’t require any tweaks. As long as you already have your Git workspace set up on Linux, it’ll detect it. To use it, close any open Nautilus windows, then re-open them.
After re-launching Nautilus, head to a Git folder on your hard drive. From there, right-click and look for “RabbitVCS Git” and hover-over it to reveal all available actions.
Did you know that RabbitVCS lets users update a Git repo directly from Nautilus? To do it, click on the repo folder, then right-click and choose “update”. Selecting “update” instantly downloads the new code to the repo folder.
Need to commit code to a Git repo? Open up the Nautilus file manager and select a repo folder. From there, right-click anywhere and select the “Commit” option.
To push code from Nautilus (via RabbitVCS Git,) right-click on the file you’d like to send, then click the “push” option.
RabbitVCS lets users merge changes right from the file manager! To do it, locate the files you’d like to merge. Then, right-click anywhere, and hover over the “RabbitVCS Git” menu. In the menu area, click the “merge” button.
The default settings for RabbitVCS Git should work for most users. However, if you’re not a fan of how it’s set up, it’s easy to change. To access the settings area, right-click, select “RabbitVCS Git,” then “settings.”