<?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 oorkan</title>
    <link>https://www.oorkan.dev/blog/tags/git/</link>
    <description>Recent content in Git on oorkan</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 27 Feb 2025 18:00:00 +0400</lastBuildDate>
    <atom:link href="https://www.oorkan.dev/blog/tags/git/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>gitignore exceptions: The Good, the Bad and the Ugly</title>
      <link>https://www.oorkan.dev/blog/gitignore-exceptions-the-tricky-parts/</link>
      <pubDate>Thu, 27 Feb 2025 18:00:00 +0400</pubDate>
      <guid>https://www.oorkan.dev/blog/gitignore-exceptions-the-tricky-parts/</guid>
      <description>&lt;p&gt;As you know, gitignore files allow us to make ignore exceptions for files and directories using the the exclamation mark &lt;strong&gt;!&lt;/strong&gt;. For multi-level directory structures adding gitignore exceptions can become really tricky.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s take an example. Say we have the following structure on our local:&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-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;my-app/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  └── .gitignore&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  └── dir1/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  └── foo.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  └── bar.txt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  └── baz.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;p&gt;We want to ignore everything in &lt;code&gt;my-app&lt;/code&gt; directory except the file &lt;code&gt;baz.txt&lt;/code&gt;. We simply add to our &lt;code&gt;.gitignore&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setup the GitHub CLI</title>
      <link>https://www.oorkan.dev/blog/setup-the-github-cli/</link>
      <pubDate>Mon, 04 Jan 2021 17:30:00 +0400</pubDate>
      <guid>https://www.oorkan.dev/blog/setup-the-github-cli/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The easiest way to install the GitHub CLI (henceforth &lt;code&gt;gh&lt;/code&gt;) under Linux or Mac is to use &lt;a href=&#34;https://gist.github.com/oorkan/6e4f44652c1458032d20d517d52ab608&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Homebrew&lt;/a&gt;:&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-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;brew install gh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;p&gt;Under Linux, &lt;code&gt;gh&lt;/code&gt; is also available via &lt;code&gt;snapd&lt;/code&gt; on the &lt;code&gt;edge&lt;/code&gt; channel (dev builds).&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-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo snap install --edge gh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;p&gt;And under Windows, we can just use the &lt;a href=&#34;https://github.com/cli/cli/releases/download/v1.4.0/gh_1.4.0_windows_amd64.msi&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;MSI Installer&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Other installation instructions and methods are available at &lt;a href=&#34;https://cli.github.com/manual/installation&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;cli.github.com/manual/installation&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt; &lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Authentication&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Before using the &lt;code&gt;gh&lt;/code&gt;, first, we need to authenticate in GitHub. To do that we run the following command in the terminal:&lt;/p&gt;</description>
    </item>
    <item>
      <title>3rd-party Git GUI Clients</title>
      <link>https://www.oorkan.dev/blog/3rd-party-git-gui-clients/</link>
      <pubDate>Sat, 29 Aug 2020 23:51:40 +0400</pubDate>
      <guid>https://www.oorkan.dev/blog/3rd-party-git-gui-clients/</guid>
      <description>&lt;p&gt;The full list is available at &lt;a href=&#34;https://git-scm.com/downloads/guis/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;git-scm.com/downloads/guis/&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://www.gitkraken.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GitKraken&lt;/a&gt; is well-known from those and is, probably, the most popular git GUI client out there.&lt;/p&gt;&#xA;&lt;a href=&#34;https://git-scm.com/downloads/guis/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;img src=&#34;https://res.cloudinary.com/oorkan/image/upload/v1598732293/blog/img/topics/git/git-gui_clients_tkaai8.jpg&#34; alt=&#34;Git GUI Clients&#34;&gt;&lt;/a&gt;</description>
    </item>
    <item>
      <title>Git: Cloning a Project With Submodules</title>
      <link>https://www.oorkan.dev/blog/git-cloning-a-project-with-submodules/</link>
      <pubDate>Sun, 26 Apr 2020 01:34:19 +0400</pubDate>
      <guid>https://www.oorkan.dev/blog/git-cloning-a-project-with-submodules/</guid>
      <description>&lt;p&gt;To retrive git submodules as well while cloning we can use &lt;code&gt;--recurse-submodules&lt;/code&gt; command attribute.&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-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone --recurse-submodules &amp;lt;repository_url&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;p&gt;More info at &lt;a href=&#34;https://git-scm.com/book/en/v2/Git-Tools-Submodules&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;git-scm.com/book/en/v2/Git-Tools-Submodules&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Guthub? It Still Works</title>
      <link>https://www.oorkan.dev/blog/guthub-it-still-works/</link>
      <pubDate>Wed, 08 Apr 2020 16:00:13 +0400</pubDate>
      <guid>https://www.oorkan.dev/blog/guthub-it-still-works/</guid>
      <description>&lt;p&gt;If you mistakenly typed guthub.com in the browser address bar, it will still redirect you to the GitHub page.&lt;/p&gt;&#xA;&lt;p&gt;Try: &lt;a href=&#34;http://guthub.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;guthub.com&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
