<?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 Arshad Siddiqui</title><link>https://arshadhs.github.io/categories/git/</link><description>Recent content in Git on Arshad Siddiqui</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 04 Apr 2024 15:29:34 +0100</lastBuildDate><atom:link href="https://arshadhs.github.io/categories/git/index.xml" rel="self" type="application/rss+xml"/><item><title>GIT</title><link>https://arshadhs.github.io/docs/technology/gitcheatsheet/</link><pubDate>Thu, 04 Apr 2024 15:29:34 +0100</pubDate><guid>https://arshadhs.github.io/docs/technology/gitcheatsheet/</guid><description>&lt;h2 id="git-cheat-sheet">
 Git Cheat Sheet
 
 &lt;a class="anchor" href="#git-cheat-sheet">#&lt;/a>
 
&lt;/h2>
&lt;hr>
&lt;h2 id="-configuration-one-time-setup">
 🔧 Configuration (One-time setup)
 
 &lt;a class="anchor" href="#-configuration-one-time-setup">#&lt;/a>
 
&lt;/h2>

&lt;blockquote class='book-hint '>
 &lt;p>git config user.name &amp;ldquo;Your Name&amp;rdquo;&lt;br>
git config user.email &amp;ldquo;&lt;a href="mailto:you@example.com">you@example.com&lt;/a>&amp;rdquo;&lt;/p>
&lt;/blockquote>&lt;p>Set username and email for commits.&lt;/p>
&lt;hr>
&lt;h2 id="-repository-setup">
 📁 Repository Setup
 
 &lt;a class="anchor" href="#-repository-setup">#&lt;/a>
 
&lt;/h2>

&lt;blockquote class='book-hint '>
 &lt;p>git init&lt;br>
git init -b main&lt;br>
git remote add origin &lt;url>&lt;/p>
&lt;/blockquote>&lt;p>Initialise a repository and connect it to a remote.&lt;/p>
&lt;hr>
&lt;h2 id="-status--inspection">
 🔍 Status &amp;amp; Inspection
 
 &lt;a class="anchor" href="#-status--inspection">#&lt;/a>
 
&lt;/h2>

&lt;blockquote class='book-hint '>
 &lt;p>git status&lt;br>
git log&lt;br>
git show &lt;commit>&lt;br>
git diff&lt;/p>
&lt;/blockquote>&lt;p>Check repository state, history, commit details, and differences.&lt;/p></description></item><item><title>GitHub</title><link>https://arshadhs.github.io/docs/technology/sshkeygithub/</link><pubDate>Wed, 07 Nov 2018 21:45:00 +0000</pubDate><guid>https://arshadhs.github.io/docs/technology/sshkeygithub/</guid><description>&lt;h1 id="adding-a-ssh-key-to-github-account">
 Adding a SSH key to GitHub account
 
 &lt;a class="anchor" href="#adding-a-ssh-key-to-github-account">#&lt;/a>
 
&lt;/h1>
&lt;pre tabindex="0">&lt;code>ls -al ~/.ssh
&lt;/code>&lt;/pre>&lt;p>Generate a key&lt;/p>
&lt;pre tabindex="0">&lt;code>ssh-keygen -t rsa -b 4096 -C &amp;lt;user mail id&amp;gt;
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
&lt;/code>&lt;/pre>&lt;p>Clip or copy manually&lt;/p>
&lt;pre tabindex="0">&lt;code>clip &amp;lt; ~/.ssh/id_rsa.pub
cat ~/.ssh/id_rsa.pub
&lt;/code>&lt;/pre>&lt;p>Go to GitHub, add the public key to settings -&lt;/p>
&lt;pre tabindex="0">&lt;code>https://github.com/settings/keys
&lt;/code>&lt;/pre>&lt;hr>
&lt;p>&lt;a href="https://arshadhs.github.io/">Home&lt;/a> | &lt;a href="https://arshadhs.github.io/docs/technology/">
 Technology
&lt;/a>&lt;/p></description></item></channel></rss>