<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Balaji Hariharan NS</title>
    <description>The latest articles on DEV Community by Balaji Hariharan NS (@balaji_hariharanns_27623).</description>
    <link>https://dev.to/balaji_hariharanns_27623</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3080316%2F19faab2d-e940-4b1d-8afd-2575bb38cbc4.jpg</url>
      <title>DEV Community: Balaji Hariharan NS</title>
      <link>https://dev.to/balaji_hariharanns_27623</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/balaji_hariharanns_27623"/>
    <language>en</language>
    <item>
      <title>Step-by-Step Git Commands Execution:</title>
      <dc:creator>Balaji Hariharan NS</dc:creator>
      <pubDate>Thu, 24 Apr 2025 03:50:37 +0000</pubDate>
      <link>https://dev.to/balaji_hariharanns_27623/step-by-step-git-commands-execution-4342</link>
      <guid>https://dev.to/balaji_hariharanns_27623/step-by-step-git-commands-execution-4342</guid>
      <description>&lt;p&gt;&lt;strong&gt;Initialize a Git repository:&lt;/strong&gt;&lt;br&gt;
    git init&lt;br&gt;
Creates a new Git repository in the folder 24MCR008.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a file to staging area:&lt;/strong&gt;&lt;br&gt;
    git add 24MCR008.txt&lt;br&gt;
Adds 24MCR008.txt to the staging area.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commit the file:&lt;/strong&gt;&lt;br&gt;
    git commit -m "First commit"&lt;br&gt;
Creates a commit with the message "First commit".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check Git status:&lt;/strong&gt;&lt;br&gt;
     git status&lt;br&gt;
Shows that 24MCR008.txt has been modified but not staged.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;View commit log:&lt;/strong&gt;&lt;br&gt;
     git log&lt;br&gt;
Displays the commit history (one commit at this point).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add remote GitHub repository:&lt;/strong&gt;&lt;br&gt;
     git remote add origin &lt;a href="https://github.com/balajihariharan01/24MCR008.git" rel="noopener noreferrer"&gt;https://github.com/balajihariharan01/24MCR008.git&lt;/a&gt;&lt;br&gt;
Links the local repository to a remote GitHub repo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check current branch:&lt;/strong&gt;&lt;br&gt;
     git branch&lt;br&gt;
Shows the current branch is master.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rename branch from master to main:&lt;/strong&gt;&lt;br&gt;
     git branch -M main&lt;br&gt;
Renames the current branch to main.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Git global config for email and username:&lt;/strong&gt;&lt;br&gt;
    git config --global user.email "&lt;a href="mailto:balajihariharanns@gmail.com"&gt;balajihariharanns@gmail.com&lt;/a&gt;"&lt;br&gt;
git config --global user.name "balajihariharan01"&lt;br&gt;
Sets your global Git identity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push code to remote repo for the first time:&lt;/strong&gt;&lt;br&gt;
     git push -u origin main&lt;br&gt;
Pushes the main branch to GitHub and sets upstream tracking.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxgeq97o4lqgb35t0nl3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxgeq97o4lqgb35t0nl3v.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1t1wh0tyaxrog9r4d1bv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1t1wh0tyaxrog9r4d1bv.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2g867n6p2o1gsv5obpj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2g867n6p2o1gsv5obpj.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0hcsal1oxf0regbqj1fs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0hcsal1oxf0regbqj1fs.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then , Again We will Modify or add new file means we need to follow the same steps, like&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m “message”
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
  </channel>
</rss>
