[http://git-scm.com/ Git is a distributed version control system] much like [[Mercurial]], [[Bazaar]]
and DaRcs.

== Official Front Ends ==

Emacs comes with a front end for Git, supporting a large subset of Git's functionality.

* Emacs comes with a generic version control front end called VersionControl or [[VC]]. It supports Git and many other version control system (vcs).  This is a good choice if you use other vcs besides Git or have no desire to use features unique to Git.

* Git used to include an Emacs front end for Git: ##git.el##.  However, it is no longer maintained and superseded by more modern third-party packages.  As of April 2018, the upstream Git repository removed the code and ships only a deprecation warning.  For more information about this package as well as ##git-blame.el## another library distributed with Git see the [http://git.kernel.org/cgit/git/git.git/tree/contrib/emacs/README?id=HEAD README] file accompanying these libraries.

If you are running an older Ubuntu version, you might get those Git Emacs contrib files from ##git-core##, but for newer versions you will need to install ##git-el## package with ##sudo apt-get install git-el##.


== Third-party Front Ends ==

These third-party packages are neither part of Git nor Emacs. These front ends support a large subset of Git's functionality.

* [[Magit]] is the most popular front end for Git. If you are new to Git and do not need support for other vcs this is likely the package you should try first.

* [https://github.com/byplayer/egg Egg] (Emacs Got Git) is a fork of Magit. It currently isn't very actively maintained.

* [http://github.com/tsgates/git-emacs git-emacs] is advertised as "yet another git mode on emacs for newbies".

* DistributedVersionControl (DVC) is a generic front end similar to VC but specialized to modern dvcs like Git.

* [https://elpa.gnu.org/packages/gited.html Gited] is a Git front end with a dired-like interface.


== Extensions ==

These packages are *not* "complete" front ends but "only" to certain Git features.  Often they can be used *in addition to* the front ends mentioned above.

* [https://github.com/dgutov/diff-hl diff-hl] highlights uncommitted changes on the fly (see ##diff-hl-flydiff-mode##).

* [https://github.com/nonsequitur/git-gutter-plus git-gutter-plus] supports reverting, staging, and committing Git hunks straight from the buffer.

* [http://github.com/jimhourihan/egit/tree/master egit] is an Emacs Git *history* interface intended to be similar to ##qgit## or ##gitk##.  Requires ##git.el##.

* [https://github.com/mbunkus/mo-git-blame mo-git-blame] is an interactive and iterative major mode for ##git blame##.

* [http://floatsolutions.com/blog/2010/05/tortoisegit-interface-for-emacs tortoise-git.el] is a simple interface to *Tortoise Git* within Emacs 

* [[Gitsum]] is a mode to do *interactive partial commits* with Emacs in the style of ##darcs record##

* GitDwim defines context-aware commands.

* GitCommitMode helps with editing and manipulating commit messages.

* [https://github.com/sshaw/git-link git-link] creates a URL representing the current buffer's location in its [[GitHub]], Bitbucket, Gitorious etc. repository at the current line number or active region.

* [[GitShow]] -- Quick git way to see a particular revision of a file.

* [https://github.com/pidu/git-timemachine git-timemachine] Step through historic versions of git controlled file using everyone's favourite editor

== Also see ==

=== Emacs from Git ===

Emacs uses Git since 2014-11-12.

For more information on building and developing Emacs, see:

* EmacsFromGit
* GitForEmacsDevs and GitQuickStartForEmacsDevs

=== Hosting ===

Publicly hosted git repositories are also known as /forges/.

* [http://github.com github] is a popular website to host and browse git repositories.  See GitHub.
* [http://bitbucket.org bitbucket] is another popular website to host and browse git repositories.  See BitBucket.
* [http://gitlab.com gitlab] is the commercial version of the self-hosted opensource platform to host and browse git repositories.  See GitLab
* [http://notabug.org NotABug] is a free-software code collaboration platform for freely licensed projects.  See NotABug.
* [http://sourcehut.org Sourcehut] is a newer (2018?) option dedicated to being faster and more lightweight than the others, without requiring JavaScript, and made with 100% free and open source software.

=== Blog posts ===

* [http://alexott.net/en/writings/emacs-vcs/EmacsGit.html Work with Git from Emacs] is an article by AlexOtt that provides more information some of the mentioned packages.
* [http://snarfed.org/emacs-vc-git-tweaks This] blog post adds direct ##git add## and ##git reset## support to VC.

----
[[Git]] CategoryVersionControl
