<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Untitled Publication]]></title><description><![CDATA[Untitled Publication]]></description><link>https://blog.ajulm.com.np</link><generator>RSS for Node</generator><lastBuildDate>Tue, 05 May 2026 02:02:56 GMT</lastBuildDate><atom:link href="https://blog.ajulm.com.np/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Git cheatsheet]]></title><description><![CDATA[This post is a tribute to all the knowledge and experience I have gained in using Git, a version control system, and contains valuable code references based on what I have learned over time. It serves as a compilation of my learning journey, and I ho...]]></description><link>https://blog.ajulm.com.np/git-cheatsheet</link><guid isPermaLink="true">https://blog.ajulm.com.np/git-cheatsheet</guid><category><![CDATA[Git]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Git Commands]]></category><dc:creator><![CDATA[Ajul Maharjan]]></dc:creator><pubDate>Thu, 20 Jul 2023 11:53:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1689854241857/7e0a6544-590b-4b00-839a-641a7f566126.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This post is a tribute to all the knowledge and experience I have gained in using Git, a version control system, and contains valuable code references based on what I have learned over time. It serves as a compilation of my learning journey, and I hope it can be helpful to others who are also exploring the world of Git and coding.</p>
<h2 id="heading-to-initialize-the-repo">To initialize the repo.</h2>
<pre><code class="lang-plaintext">git init
</code></pre>
<h2 id="heading-working-with-branch">Working with Branch.</h2>
<h3 id="heading-creating-a-new-branch">Creating a new branch</h3>
<pre><code class="lang-bash">git checkout -b branch_name
git pull
git push --set-upstream origin branch_name
</code></pre>
<h3 id="heading-creating-a-new-branch-from-the-current-branch">Creating a new branch from the current branch.</h3>
<pre><code class="lang-bash">git checkout current_branch
git checkout -b new_branch current_branch
git push origin new_branch
</code></pre>
<h3 id="heading-deleting-branch-locally">Deleting branch locally.</h3>
<pre><code class="lang-bash">git branch -d branchname
</code></pre>
<h3 id="heading-deleting-the-branch-on-the-remote-repository">Deleting the branch on the remote repository.</h3>
<pre><code class="lang-bash">git push origin --delete remoteBranchName
</code></pre>
<h3 id="heading-git-ignore">Git ignore</h3>
<p>Adding a file, folder to ignore using <strong>.gitignore</strong> file.</p>
<p><strong>Removing previously added files.</strong></p>
<p>Add a file name to remove from git repo in .gitignore file then run the command mentioned below.</p>
<pre><code class="lang-bash">git rm --cached file_name.txt
</code></pre>
]]></content:encoded></item></channel></rss>