<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikemacs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zakkak</id>
	<title>WikEmacs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wikemacs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zakkak"/>
	<link rel="alternate" type="text/html" href="https://wikemacs.org/wiki/Special:Contributions/Zakkak"/>
	<updated>2026-04-10T06:02:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wikemacs.org/index.php?title=Git&amp;diff=47194</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Git&amp;diff=47194"/>
		<updated>2016-01-05T20:12:25Z</updated>

		<summary type="html">&lt;p&gt;Zakkak: /* Highlight diffs */  FIx typo &amp;quot;that git-gitter&amp;quot; -&amp;gt; &amp;quot;than git-gutter&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Packages to interfere with the '''git''' version control system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Full interfaces =&lt;br /&gt;
&lt;br /&gt;
== Magit ==&lt;br /&gt;
&lt;br /&gt;
'''Magit''' is a great Emacs mode for working with Git repositories. It provides a convenient interface for the most common Git operations. Please visit its own [[Magit]] page.&lt;br /&gt;
&lt;br /&gt;
= Specific use cases =&lt;br /&gt;
&lt;br /&gt;
== Git blame ==&lt;br /&gt;
&lt;br /&gt;
'''Git-blame''' is a package, available in [[ELPA]], which provides a minor mode for incremental blame.&lt;br /&gt;
&lt;br /&gt;
== Show last commit message for current line ==&lt;br /&gt;
&lt;br /&gt;
This package provides a function called '''git-messenger:popup-message'''&lt;br /&gt;
that when called will pop-up the last git commit message for the&lt;br /&gt;
current line. This uses the git-blame tool internally.&lt;br /&gt;
&lt;br /&gt;
Available in ELPA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Highlight uncommited changes ==&lt;br /&gt;
&lt;br /&gt;
=== Git gutter ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/syohex/emacs-git-gutter Git-gutter]  is an extension to highlight uncommitted changes on the left side of the window, indicating wether a line has been inserted, modified or deleted, and allowing you to jump between and revert them selectively. [https://github.com/dgutov/diff-hl diff-hl] does it too and works with Git, Mercurial, Bazaar and Svn, and it provides similar functionnality for '''dired'''. Both are available in [[ELPA]]. They are [[Tramp]]-aware.&lt;br /&gt;
&lt;br /&gt;
After installation, call the minor modes or enable them:&lt;br /&gt;
&lt;br /&gt;
    (add-hook 'python-mode-hook 'git-gutter-mode)&lt;br /&gt;
&lt;br /&gt;
==== Jump between changes ====&lt;br /&gt;
&lt;br /&gt;
To jump between changes: {{Command|git-gutter:next-hunk}} or {{Command|diff-hl-next-hunk}}.&lt;br /&gt;
&lt;br /&gt;
[[File:git-gutter.png]]&lt;br /&gt;
&lt;br /&gt;
=== Highlight diffs ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/dgutov/diff-hl Diff-hl] goes a little further than git-gutter in that it can highlight the uncommited diffs, even from [[Dired]]. And we can get them on the fly while we type:&lt;br /&gt;
&lt;br /&gt;
    (diff-hl-flydiff-mode)&lt;br /&gt;
&lt;br /&gt;
== Commit on every change ==&lt;br /&gt;
&lt;br /&gt;
[http://melpa.org/#/git-auto-commit-mode git-auto-commit-mode] (on MELPA) is a minor mode that tries to commit a change to a file after every save. It can also push automatically.&lt;br /&gt;
&lt;br /&gt;
== See previous versions of file ==&lt;br /&gt;
&lt;br /&gt;
It's very easy with [https://github.com/pidu/git-timemachine git-timemachine]. Once you have called {{Command|git-timemachine}} you'll have the keys:&lt;br /&gt;
&lt;br /&gt;
* '''p''' Visit previous historic version&lt;br /&gt;
* '''n''' Visit next historic version&lt;br /&gt;
* '''w''' Copy the abbreviated hash of the current historic version&lt;br /&gt;
* '''W''' Copy the full hash of the current historic version&lt;br /&gt;
* '''g''' Goto nth revision&lt;br /&gt;
* '''q''' Exit the time machine.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
See also the full list of packages to interact with Github, Gitlab and others in the [[Github]] page.&lt;br /&gt;
&lt;br /&gt;
See a full list and a method to install them all at once on [https://github.com/tarsius/git-elisp tarsiu's github page].&lt;br /&gt;
&lt;br /&gt;
[[Category:Version Control]][[Category:Convenience]][[Category:Third Party Package]]&lt;/div&gt;</summary>
		<author><name>Zakkak</name></author>
	</entry>
</feed>