<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Git on sbgrl.me</title><link>https://sbgrl.me/tags/git/</link><description>Recent content in Git on sbgrl.me</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>sylvain.bougerel@gmail.com (Sylvain Bougerel)</managingEditor><webMaster>sylvain.bougerel@gmail.com (Sylvain Bougerel)</webMaster><copyright>© 2026 Sylvain Bougerel</copyright><lastBuildDate>Fri, 15 May 2026 11:36:00 +0800</lastBuildDate><atom:link href="https://sbgrl.me/tags/git/index.xml" rel="self" type="application/rss+xml"/><item><title>Announcing autosync-git to replace autosync-magit</title><link>https://sbgrl.me/posts/autosync-git-to-replace-autosync-magit/</link><pubDate>Fri, 15 May 2026 11:36:00 +0800</pubDate><author>sylvain.bougerel@gmail.com (Sylvain Bougerel)</author><guid>https://sbgrl.me/posts/autosync-git-to-replace-autosync-magit/</guid><description>&lt;p&gt;I&amp;rsquo;m deprecating &lt;a href="https://github.com/sbougerel/autosync-magit" target="_blank" rel="noreferrer"&gt;Autosync-Magit&lt;/a&gt; in favour of &lt;a href="https://github.com/sbougerel/autosync-git" target="_blank" rel="noreferrer"&gt;Autosync-git&lt;/a&gt;.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Migrating
 &lt;div id="migrating" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#migrating" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I kept aliases to the previous variables and hooks such as &lt;code&gt;autosync-magit-after-pull-hook&lt;/code&gt; to make switching to the new tool easier. &lt;code&gt;autosync-git&lt;/code&gt; conflicts with &lt;code&gt;autosync-magit&lt;/code&gt; due to aliases, so you can&amp;rsquo;t load both concurrently. I will eventually deprecate these aliases, so you should port your &lt;code&gt;.dir-locals.el&lt;/code&gt; to look like:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-emacs-lisp" data-lang="emacs-lisp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nv"&gt;autosync-git-commit-message&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;My commit message&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;autosync-git-pull-timer&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;autosync-git&lt;/span&gt;&lt;span class="p"&gt;))))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;What changed
 &lt;div id="what-changed" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-changed" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The new tool sheds a dependency on &lt;a href="https://magit.vc/" target="_blank" rel="noreferrer"&gt;Magit&lt;/a&gt;, to just use &lt;code&gt;git&lt;/code&gt; and Emacs&amp;rsquo; async &lt;code&gt;make-process&lt;/code&gt; directly. This allows it to provide its own execution buffer, instead of sharing it with Magit.&lt;/p&gt;
&lt;p&gt;But the more exciting update is the better pull strategy, which reduces the risk of leaving conflicts in your current workspace, and does better at merging what does not conflict.&lt;/p&gt;
&lt;p&gt;When the remote and your local branch have diverged, the pull operation starts with a &amp;ldquo;probe&amp;rdquo; stage, where &lt;code&gt;autosync-git&lt;/code&gt; performs an in-memory 3-way merge with &lt;a href="https://git-scm.com/docs/git-merge-tree" target="_blank" rel="noreferrer"&gt;&lt;code&gt;git merge-tree&lt;/code&gt;&lt;/a&gt;. If this 3-way merge succeeds, &lt;code&gt;autosync-git&lt;/code&gt; does a &lt;code&gt;rebase&lt;/code&gt; (default) or &lt;code&gt;merge&lt;/code&gt;. &lt;code&gt;rebase&lt;/code&gt; is now the default to keep the history as linear as possible. But you can change it to &lt;code&gt;merge&lt;/code&gt; if you prefer.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-emacs-lisp" data-lang="emacs-lisp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nv"&gt;autosync-git-pull-style&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;autosync-git&lt;/span&gt;&lt;span class="p"&gt;))))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;When keeping the default &lt;code&gt;rebase&lt;/code&gt; strategy, if a conflict occurs, it immediately aborts the rebase and informs you in &lt;code&gt;*Messages*&lt;/code&gt;. You can also force the pull operation to leave any conflicts in the repository instead of aborting. More to discover at &lt;a href="https://github.com/sbougerel/autosync-git" target="_blank" rel="noreferrer"&gt;Autosync-git&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>