<?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[Error? We’ll fix it faster than AI🚀😂]]></title><description><![CDATA[Error? We’ll fix it faster than AI🚀😂]]></description><link>https://premiumblog.getpremium.in</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1731576427065/e8b2d338-8095-4d7c-a910-89f2054c09ab.png</url><title>Error? We’ll fix it faster than AI🚀😂</title><link>https://premiumblog.getpremium.in</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 27 May 2026 03:44:28 GMT</lastBuildDate><atom:link href="https://premiumblog.getpremium.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Basic Git Commands]]></title><description><![CDATA[To get started with Git, First download Git for Windows/MacOS/Linux from the official website https://git-scm.com/downloads and after installing it.
create a folder on Desktop and right-click on the folder choose the option "git bash here" & start wi...]]></description><link>https://premiumblog.getpremium.in/basic-git-commands</link><guid isPermaLink="true">https://premiumblog.getpremium.in/basic-git-commands</guid><category><![CDATA[Git]]></category><category><![CDATA[gitcheatsheet]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[kushagra singh]]></dc:creator><pubDate>Sun, 16 Jul 2023 10:34:56 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1689503490695/69af4c3d-e1f5-444e-bd36-73190c7d9886.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To get started with Git, First download Git for Windows/MacOS/Linux from the official website <a target="_blank" href="https://git-scm.com/downloads">https://git-scm.com/downloads</a> and after installing it.</p>
<p>create a folder on Desktop and right-click on the folder choose the option "git bash here" &amp; start with initializing the empty repository using the <code>git init</code> command. To open VScode write <code>code .</code> and create any type of file like HTML, CSS, javascript, python etc, and follow the below commands to push the code to GitHub.</p>
<p>🏁 Basic Git Commands</p>
<ol>
<li><p>Initialize a Git repository in your project folder: <code>git init</code></p>
</li>
<li><p>Add all the files to the staging area: <code>git add -A</code></p>
</li>
<li><p>Commit the changes with a message: <code>git commit -m "Initial commit"</code></p>
</li>
<li><p>Check the status of your repository: <code>git status</code></p>
</li>
<li><p>View the commit history: <code>git log</code></p>
</li>
</ol>
<p>🔍 Viewing Changes</p>
<ol>
<li><p>See the changes made to the files: <code>git diff</code></p>
</li>
<li><p>See the changes between a specific commit and the current state: <code>git diff &lt;commit&gt;</code></p>
</li>
<li><p>See the changes between two commits: <code>git diff &lt;commit1&gt;..&lt;commit2&gt;</code></p>
</li>
<li><p>See the changes in a specific file: <code>git diff &lt;file&gt;</code></p>
</li>
</ol>
<p>🌳 Branching and Merging</p>
<ol>
<li><p>Create a new branch: <code>git branch &lt;branch-name&gt;</code></p>
</li>
<li><p>Switch to a branch: <code>git checkout &lt;branch-name&gt;</code></p>
</li>
<li><p>Create a new branch and switch to it: <code>git checkout -b &lt;branch-name&gt;</code></p>
</li>
<li><p>Merge a branch into the current branch: <code>git merge &lt;branch-name&gt;</code></p>
</li>
<li><p>Delete a branch: <code>git branch -d &lt;branch-name&gt;</code></p>
</li>
</ol>
<p>🔄 Undoing Changes</p>
<ol>
<li><p>Discard changes in the working directory: <code>git checkout -- &lt;file&gt;</code></p>
</li>
<li><p>Unstage a file: <code>git reset HEAD &lt;file&gt;</code></p>
</li>
<li><p>Undo the last commit: <code>git reset HEAD~1</code></p>
</li>
<li><p>Undo the last commit and keep changes: <code>git reset --soft HEAD~1</code></p>
</li>
<li><p>Undo the last commit and discard changes: <code>git reset --hard HEAD~1</code></p>
</li>
</ol>
<p>💾 Working with Remote Repositories</p>
<ol>
<li><p>Clone a remote repository: <code>git clone &lt;repository-url&gt;</code></p>
</li>
<li><p>Add a remote repository: <code>git remote add &lt;name&gt; &lt;repository-url&gt;</code></p>
</li>
<li><p>Push changes to a remote repository: <code>git push &lt;remote&gt; &lt;branch&gt;</code></p>
</li>
<li><p>Pull changes from a remote repository: <code>git pull &lt;remote&gt; &lt;branch&gt;</code></p>
</li>
<li><p>Fetch changes from a remote repository: <code>git fetch &lt;remote&gt;</code></p>
</li>
</ol>
<p>📂 Stashing Changes</p>
<ol>
<li><p>Stash changes: <code>git stash</code></p>
</li>
<li><p>List stashes: <code>git stash list</code></p>
</li>
<li><p>Apply a stash: <code>git stash apply &lt;stash&gt;</code></p>
</li>
<li><p>Delete a stash: <code>git stash drop &lt;stash&gt;</code></p>
</li>
</ol>
<p>That's a comprehensive list of Git commands from basic to advanced.</p>
]]></content:encoded></item></channel></rss>