How To Install git-annex on CentOS 7

In this tutorial we learn how to install git-annex on CentOS 7. git-annex is Manage files with git, without checking their contents into git

Introduction

In this tutorial we learn how to install git-annex on CentOS 7.

What is git-annex

Git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space. Even without file content tracking, being able to manage files with git, move files around and delete files with versioned directory trees, and use branches and distributed clones, are all very handy reasons to use git. And annexed files can co-exist in the same git repository with regularly versioned files, which is convenient for maintaining documents, Makefiles, etc that are associated with annexed files but that benefit from full revision control. When a file is annexed, its content is moved into a key-value store, and a symlink is made that points to the content. These symlinks are checked into git and versioned like regular files. You can move them around, delete them, and so on. Pushing to another git repository will make git-annex there aware of the annexed file, and it can be used to retrieve its content from the key-value store.

We can use yum or dnf to install git-annex on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install git-annex.

Install git-annex on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install git-annex using yum by running the following command:

sudo yum -y install git-annex

Install git-annex on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install git-annex using dnf by running the following command:

sudo dnf -y install git-annex

How To Uninstall git-annex on CentOS 7

To uninstall only the git-annex package we can use the following command:

sudo dnf remove git-annex

References

Summary

In this tutorial we learn how to install git-annex on CentOS 7 using yum and dnf.