<?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 Solarized Sublime Sekai</title>
    <link>https://vincenttam.gitlab.io/tags/git/</link>
    <description>Recent content in Git on Solarized Sublime Sekai</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 05 Aug 2026 11:19:43 +0200</lastBuildDate>
    <atom:link href="https://vincenttam.gitlab.io/tags/git/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Safer Git Force Pushing in Neovim</title>
      <link>https://vincenttam.gitlab.io/post/2026-08-05-safer-git-force-pushing-in-neovim/</link>
      <pubDate>Wed, 05 Aug 2026 11:14:51 +0200</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2026-08-05-safer-git-force-pushing-in-neovim/</guid>
      <description>&lt;p&gt;Accidentally triggering a destructive command is one of the worst feelings&#xA;during daily development. Keybindings that alter remote branch history—like&#xA;&lt;code&gt;git push --force&lt;/code&gt;—should require deliberate intent so they aren&amp;rsquo;t hit by a&#xA;stray keypress.&lt;/p&gt;&#xA;&lt;p&gt;Inspired by a commit in &lt;a href=&#34;https://git.hallada.net/thallada/neovim-config/commit/203aeadad8efa6177d1e5905ed5b53c4d5635ea8&#34;&gt;thallada&amp;rsquo;s neovim-config&lt;/a&gt;, shifting keymaps for&#xA;destructive operations from lowercase to uppercase (&lt;code&gt;&amp;lt;Leader&amp;gt;gf&lt;/code&gt; →&#xA;&lt;code&gt;&amp;lt;Leader&amp;gt;gF&lt;/code&gt;) adds a crucial layer of friction.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;the-problem-with-lowercase-shortcuts-for-destructive-actions&#34;&gt;The Problem with Lowercase Shortcuts for Destructive Actions&lt;/h3&gt;&#xA;&lt;p&gt;When mapping Git commands inside NeoVim, it is common to group them under a&#xA;&lt;code&gt;&amp;lt;Leader&amp;gt;g&lt;/code&gt; prefix:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git Warning: LF Will Be Replaced by CRLF</title>
      <link>https://vincenttam.gitlab.io/post/2022-06-10-git-warning-lf-will-be-replaced-by-crlf/</link>
      <pubDate>Fri, 10 Jun 2022 20:18:01 +0200</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2022-06-10-git-warning-lf-will-be-replaced-by-crlf/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m using Git Bash while writing this post.  I&amp;rsquo;ve never tested the commands on&#xA;*nix.&lt;/p&gt;&#xA;&lt;h3 id=&#34;background&#34;&gt;Background&lt;/h3&gt;&#xA;&lt;p&gt;Some of the tags and titles were written as &amp;ldquo;LateX&amp;rdquo;/&amp;ldquo;latex&amp;rdquo; in the source files.&#xA;I batch corrected them with Git Grep and GNU Sed.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git grep --name-only -IiE ^-&lt;span class=&#34;se&#34;&gt;\ &lt;/span&gt;latex&lt;span class=&#34;s1&#34;&gt;$&amp;#39;\r&amp;#39;&lt;/span&gt;? content/&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;post,page&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;xargs -n1 sed -i &lt;span class=&#34;s2&#34;&gt;&amp;#34;s/^- latex/- LaTeX/I&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I tried to match&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;a leading &lt;code&gt;-&lt;/code&gt; using &lt;code&gt;^-&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;a whitespace &lt;code&gt;\ &lt;/code&gt; escaped by a backslash to avoid wrapping the special&#xA;character below with double quotes&lt;/li&gt;&#xA;&lt;li&gt;the string &amp;ldquo;latex&amp;rdquo; (case-insensitive)&lt;/li&gt;&#xA;&lt;li&gt;the carriage return &lt;code&gt;\r&lt;/code&gt;, which is represented by &lt;code&gt;$&#39;\r&#39;&lt;/code&gt; in bash, for at&#xA;most once (&lt;code&gt;?&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I observed that wrapping &lt;code&gt;$&#39;\r&#39;&lt;/code&gt; with &lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt; would lead to no match.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Merge GitHub Pull Requests</title>
      <link>https://vincenttam.gitlab.io/post/2018-11-18-merge-github-pull-requests/</link>
      <pubDate>Sun, 18 Nov 2018 01:05:42 +0100</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2018-11-18-merge-github-pull-requests/</guid>
      <description>&lt;h3 id=&#34;aim&#34;&gt;Aim&lt;/h3&gt;&#xA;&lt;p&gt;To merge a pull request.&lt;/p&gt;&#xA;&lt;h3 id=&#34;how&#34;&gt;How?&lt;/h3&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s take &lt;a href=&#34;https://github.com/eduardoboucas/staticman/pull/231&#34;&gt;Staticman PR 231&lt;/a&gt; as an example.  I would like to test it before&#xA;&lt;a href=&#34;https://vincenttam.gitlab.io/post/2018-09-16-staticman-powered-gitlab-pages/2/&#34;&gt;commiting this merget to Heroku&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;$ cd ~/staticman&#xA;$ git branch -a&#xA;* deploy&#xA;  dev&#xA;  master&#xA;  ...&#xA;$ git remote -v&#xA;eduardoboucas https://github.com/eduardoboucas/staticman.git (fetch)&#xA;eduardoboucas https://github.com/eduardoboucas/staticman.git (push)&#xA;heroku  https://git.heroku.com/staticman3.git (fetch)&#xA;heroku  https://git.heroku.com/staticman3.git (push)&#xA;...&#xA;$ git pull eduardoboucas pull/231/head:deploy&#xA;remote: Enumerating objects: 10, done.&#xA;remote: Counting objects: 100% (10/10), done.&#xA;remote: Total 18 (delta 10), reused 10 (delta 10), pack-reused 8&#xA;Unpacking objects: 100% (18/18), done.&#xA;From https://github.com/eduardoboucas/staticman&#xA; ! [rejected]        refs/pull/231/head -&amp;gt; deploy  (non-fast-forward)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I executed the last command on branch &lt;code&gt;dev&lt;/code&gt;.  I &lt;em&gt;didn&amp;rsquo;t&lt;/em&gt; have time to figure out&#xA;the reason for this error.  The following commands should work.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Stow Your Dotfiles</title>
      <link>https://vincenttam.gitlab.io/post/2018-07-08-stow-your-dotfiles/</link>
      <pubDate>Sun, 08 Jul 2018 16:01:22 +0200</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2018-07-08-stow-your-dotfiles/</guid>
      <description>&lt;p&gt;I correctly set up the system configuration file manager &lt;a href=&#34;https://www.gnu.org/software/stow/&#34;&gt;GNU Stow&lt;/a&gt;&#xA;and the version control system (VCS) &lt;a href=&#34;https://git-scm.com/&#34;&gt;Git&lt;/a&gt; on&#xA;&lt;a href=&#34;https://vincenttam.gitlab.io/post/2018-07-04-fujitsu-lh532-fan-cleaning/&#34;&gt;my Fujitsu Lifebook&lt;/a&gt; so that the former can automatically&#xA;&lt;a href=&#34;https://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html&#34;&gt;install system configuration files like modules&lt;/a&gt;, whereas the later&#xA;can track the code in those files.&lt;/p&gt;&#xA;&lt;p&gt;What I mean for &lt;em&gt;correctly&lt;/em&gt; is that in the &lt;code&gt;ssh&lt;/code&gt; folder of the remote&#xA;dotfiles repo, there is &lt;em&gt;neither&lt;/em&gt; SSH key files &lt;em&gt;nor&lt;/em&gt; entries&#xA;representing SSH keys in the gitignore file.  You may view&#xA;&lt;a href=&#34;https://gitlab.com/juhlik/dotfiles/tree/e45cf51c3a073f64b1f707ac6cbc78ef38715e45&#34;&gt;Jan Uhlik&amp;rsquo;s dotfiles&lt;/a&gt; on GitLab as an example.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
