<?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: Kavin T 24MCR053</title>
    <description>The latest articles on DEV Community by Kavin T 24MCR053 (@kavin_t24mcr053_a2852585).</description>
    <link>https://dev.to/kavin_t24mcr053_a2852585</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3082078%2F8d83d3c5-446d-4e98-addc-b64547342376.png</url>
      <title>DEV Community: Kavin T 24MCR053</title>
      <link>https://dev.to/kavin_t24mcr053_a2852585</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kavin_t24mcr053_a2852585"/>
    <language>en</language>
    <item>
      <title>Step-by-Step Git Commands Execution:</title>
      <dc:creator>Kavin T 24MCR053</dc:creator>
      <pubDate>Thu, 24 Apr 2025 04:16:42 +0000</pubDate>
      <link>https://dev.to/kavin_t24mcr053_a2852585/step-by-step-git-commands-execution-42ne</link>
      <guid>https://dev.to/kavin_t24mcr053_a2852585/step-by-step-git-commands-execution-42ne</guid>
      <description>&lt;p&gt;🧑‍💻 Step-by-Step Git Commands for Beginners: From Init to Push&lt;br&gt;
If you're just getting started with Git and GitHub, this guide walks you through the essential commands you need to create your first repository, commit your files, and push your code to GitHub. Let’s break it down step by step with clear explanations.&lt;/p&gt;

&lt;p&gt;1️⃣ Initialize a Git Repository&lt;br&gt;
First, navigate to your project folder (here it's named 24MCR053) and initialize a Git repository:&lt;/p&gt;

&lt;p&gt;git init&lt;br&gt;
This command sets up Git in your current folder so it can start tracking your files.&lt;/p&gt;

&lt;p&gt;2️⃣ Add a File to the Staging Area&lt;br&gt;
Suppose you’ve created a file named 24MCR053.txt. To stage this file (prepare it for commit):&lt;/p&gt;

&lt;p&gt;git add 24MCR053.txt&lt;br&gt;
This tells Git to keep track of this file and include it in your next commit.&lt;/p&gt;

&lt;p&gt;3️⃣ Commit the File&lt;br&gt;
Now that the file is staged, let’s commit it with a message:&lt;/p&gt;

&lt;p&gt;git commit -m "Added Personal Details"&lt;br&gt;
This saves the current version of your file in Git history with a helpful message.&lt;/p&gt;

&lt;p&gt;4️⃣ Check Git Status&lt;br&gt;
Want to see the status of your files? Use:&lt;/p&gt;

&lt;p&gt;git status&lt;br&gt;
This command shows which files are staged, unstaged, or untracked.&lt;/p&gt;

&lt;p&gt;5️⃣ View Commit History&lt;br&gt;
To see your commit history so far:&lt;/p&gt;

&lt;p&gt;git log&lt;br&gt;
This will display the list of commits you’ve made, along with their messages and IDs.&lt;/p&gt;

&lt;p&gt;6️⃣ Add Remote GitHub Repository&lt;br&gt;
Now let’s connect your local Git repo to a GitHub repository:&lt;/p&gt;

&lt;p&gt;git remote add origin &lt;a href="https://github.com/KavinT06/24MCR053.git" rel="noopener noreferrer"&gt;https://github.com/KavinT06/24MCR053.git&lt;/a&gt;&lt;br&gt;
This command links your local repo to the remote one on GitHub.&lt;/p&gt;

&lt;p&gt;7️⃣ Check the Current Branch&lt;br&gt;
To find out what branch you are currently on:&lt;/p&gt;

&lt;p&gt;git branch&lt;br&gt;
By default, Git names it master (though this may change depending on your Git version).&lt;/p&gt;

&lt;p&gt;8️⃣ Rename Branch to main&lt;br&gt;
If you want to rename your branch from master to main:&lt;/p&gt;

&lt;p&gt;git branch -M main&lt;br&gt;
GitHub prefers using main as the default branch name.&lt;/p&gt;

&lt;p&gt;9️⃣ Set Global Git Config (User Info)&lt;br&gt;
Before pushing to GitHub, set your identity:&lt;/p&gt;

&lt;p&gt;git config --global user.email "&lt;a href="mailto:itskavin47@gmail.com"&gt;itskavin47@gmail.com&lt;/a&gt;"&lt;br&gt;
git config --global user.name "KavinT06"&lt;br&gt;
This sets your name and email globally for Git commits.&lt;/p&gt;

&lt;p&gt;🔟 Push Code to Remote for the First Time&lt;br&gt;
Finally, push your code to GitHub and set the upstream branch:&lt;/p&gt;

&lt;p&gt;git push -u origin main&lt;br&gt;
This uploads your code to GitHub and links the local main branch with the remote one.&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%2Feb5gx46prb3pix1wqxbb.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%2Feb5gx46prb3pix1wqxbb.png" alt="Image description" width="800" height="401"&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%2Fvyvhvslhohfputn4fc6l.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%2Fvyvhvslhohfputn4fc6l.png" alt="Image description" width="800" height="306"&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%2F0nf19u2eeqj8159b53qz.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%2F0nf19u2eeqj8159b53qz.png" alt="Image description" width="800" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔁 After Modifying or Adding New Files&lt;br&gt;
If you later modify files or add new ones, follow these steps again:&lt;/p&gt;

&lt;p&gt;git add .&lt;br&gt;
git commit -m "Your commit message here"&lt;br&gt;
git push origin main&lt;br&gt;
This sequence stages all changes, commits them with a message, and pushes them to GitHub.&lt;/p&gt;

&lt;p&gt;✅ Conclusion&lt;br&gt;
With these simple Git commands, you're well on your way to mastering version control. Whether you're building a personal project or collaborating on a team, these steps form the foundation of your Git workflow. Happy coding! 🚀&lt;/p&gt;

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