<?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: Rajaram Nivas</title>
    <description>The latest articles on DEV Community by Rajaram Nivas (@rajaram_nivas).</description>
    <link>https://dev.to/rajaram_nivas</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%2F2476880%2Fb348140d-d4c6-4810-b1a5-56f400fd0911.png</url>
      <title>DEV Community: Rajaram Nivas</title>
      <link>https://dev.to/rajaram_nivas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajaram_nivas"/>
    <language>en</language>
    <item>
      <title># 🚀 Dockerize and Share Your ML Model: Logistic Regression with Iris Dataset</title>
      <dc:creator>Rajaram Nivas</dc:creator>
      <pubDate>Mon, 28 Apr 2025 16:30:20 +0000</pubDate>
      <link>https://dev.to/rajaram_nivas/-dockerize-and-share-your-ml-model-logistic-regression-with-iris-dataset-18l6</link>
      <guid>https://dev.to/rajaram_nivas/-dockerize-and-share-your-ml-model-logistic-regression-with-iris-dataset-18l6</guid>
      <description>&lt;p&gt;Have you ever wanted to package your Machine Learning models into a portable container that works anywhere?&lt;br&gt;&lt;br&gt;
Today, I'll show you exactly how I did it — by training a &lt;strong&gt;Logistic Regression&lt;/strong&gt; model on the &lt;strong&gt;Iris dataset&lt;/strong&gt;, visualizing the data, and packaging everything neatly into a &lt;strong&gt;Docker image&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's dive in! 🏊‍♂️&lt;/p&gt;


&lt;h2&gt;
  
  
  📦 Project Structure
&lt;/h2&gt;

&lt;p&gt;Here’s how the project folder is organized:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ml-docker-project/
├── Dockerfile
├── model.py
└── Iris.csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🐳 Dockerfile Breakdown
&lt;/h2&gt;

&lt;p&gt;Here's the &lt;code&gt;Dockerfile&lt;/code&gt; that powers the container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# Use the official Python image as a base&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; python:3.12-slim&lt;/span&gt;

&lt;span class="c"&gt;# Set working directory inside the container&lt;/span&gt;
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;

&lt;span class="c"&gt;# Copy all project files into the container&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;

&lt;span class="c"&gt;# Install required Python packages&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--no-cache-dir&lt;/span&gt; pandas scikit-learn matplotlib joblib

&lt;span class="c"&gt;# Run model.py on container start&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["python", "model.py"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ What this Dockerfile does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses a minimal Python 3.12 base image.&lt;/li&gt;
&lt;li&gt;Copies all project files.&lt;/li&gt;
&lt;li&gt;Installs only essential Python libraries.&lt;/li&gt;
&lt;li&gt;Runs the model training script (&lt;code&gt;model.py&lt;/code&gt;) when the container starts.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧪 What &lt;code&gt;model.py&lt;/code&gt; Does
&lt;/h2&gt;

&lt;p&gt;Here’s what happens inside the &lt;code&gt;model.py&lt;/code&gt; script:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Load the Iris dataset&lt;/strong&gt; from &lt;code&gt;Iris.csv&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preview&lt;/strong&gt; dataset shape and first few rows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visualize&lt;/strong&gt; the data with:

&lt;ul&gt;
&lt;li&gt;Histograms&lt;/li&gt;
&lt;li&gt;Density plots&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prepare features and labels&lt;/strong&gt; for modeling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Split&lt;/strong&gt; the data into training and testing sets (67%-33%).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Train&lt;/strong&gt; a &lt;strong&gt;Logistic Regression&lt;/strong&gt; model using scikit-learn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluate&lt;/strong&gt; model accuracy and print the result.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Save&lt;/strong&gt; the trained model to &lt;code&gt;logistic_model.pkl&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All plots are saved silently as &lt;code&gt;.png&lt;/code&gt; files (&lt;code&gt;histograms.png&lt;/code&gt;, &lt;code&gt;density_plots.png&lt;/code&gt;) for future reference. 📊&lt;/p&gt;




&lt;h2&gt;
  
  
  🔨 How to Build, Tag, and Push the Docker Image
&lt;/h2&gt;

&lt;p&gt;Here’s the step-by-step to package and publish the image:&lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ Build the Docker Image
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; your_dockerhub_username/your_image_name:latest &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Example: &lt;code&gt;docker build -t viratpk18/24mcr078:latest .&lt;/code&gt;)&lt;/p&gt;

&lt;h3&gt;
  
  
  2️⃣ Log in to DockerHub
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3️⃣ Push the Image to DockerHub
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker push your_dockerhub_username/your_image_name:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📤 DockerHub Image Description
&lt;/h2&gt;

&lt;p&gt;When you publish, you can use a description like this:&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Title:&lt;/strong&gt; Logistic Regression on Iris Dataset - Dockerized  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Train a Logistic Regression model on the classic Iris dataset inside a container!  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loads and explores the Iris dataset
&lt;/li&gt;
&lt;li&gt;Visualizes data (histograms, density plots)
&lt;/li&gt;
&lt;li&gt;Splits into train/test
&lt;/li&gt;
&lt;li&gt;Trains a Logistic Regression model
&lt;/li&gt;
&lt;li&gt;Evaluates and prints accuracy
&lt;/li&gt;
&lt;li&gt;Saves the trained model (&lt;code&gt;logistic_model.pkl&lt;/code&gt;)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fully reproducible with Docker. Just pull and run!  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pull Command:&lt;/strong&gt;  &lt;/p&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull your_dockerhub_username/your_image_name:latest
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;strong&gt;Run Command:&lt;/strong&gt;  &lt;/p&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run your_dockerhub_username/your_image_name:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  💬 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;With just a few simple steps, we can turn a machine learning project into a &lt;strong&gt;portable&lt;/strong&gt;, &lt;strong&gt;reproducible&lt;/strong&gt;, and &lt;strong&gt;shareable&lt;/strong&gt; artifact! 🚀&lt;/p&gt;

&lt;p&gt;By using Docker, you ensure that your model can be trained, evaluated, and tested in &lt;strong&gt;any environment&lt;/strong&gt;, without worrying about Python versions, library installations, or messy dependencies.&lt;/p&gt;

&lt;p&gt;This is just the beginning — next steps could involve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding a &lt;strong&gt;Flask API&lt;/strong&gt; on top to serve the model.&lt;/li&gt;
&lt;li&gt;Building a &lt;strong&gt;simple web UI&lt;/strong&gt; for predictions.&lt;/li&gt;
&lt;li&gt;Automating deployments with &lt;strong&gt;GitHub Actions&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The possibilities are endless!&lt;/p&gt;




&lt;p&gt;If you found this helpful, follow me for more Machine Learning and DevOps content! 💬&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Happy Dockering! 🐳&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  ️⃣ #MachineLearning #Docker #Python #IrisDataset #DataScience #DevOps
&lt;/h1&gt;




</description>
    </item>
    <item>
      <title>ADVANCED GIT COMMANDS</title>
      <dc:creator>Rajaram Nivas</dc:creator>
      <pubDate>Sat, 26 Apr 2025 02:26:09 +0000</pubDate>
      <link>https://dev.to/rajaram_nivas/advanced-git-commands-2ah2</link>
      <guid>https://dev.to/rajaram_nivas/advanced-git-commands-2ah2</guid>
      <description>&lt;h2&gt;
  
  
  🚀 Level Up with These 10+ Useful Git Commands
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;By Rajaram&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Git is a powerful tool for developers — not just for saving your code, but for managing versions, collaborating, and resolving issues like a pro. In this post, let’s walk through some &lt;em&gt;essential and advanced Git commands&lt;/em&gt; that can boost your workflow.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. 🔍 &lt;code&gt;git diff&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Show changes between files, commits, or branches.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Use Case:&lt;/strong&gt; Compare your working directory with the index or a previous commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git diff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. 📜 &lt;code&gt;git log&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Display the full commit history.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Use Case:&lt;/strong&gt; Track changes, find specific commits, or understand project history.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. 📥 &lt;code&gt;git clone&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Clone a remote repository to your local machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/rajaramnivas/24MCR080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4. ⬇ &lt;code&gt;git pull&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Fetch and merge changes from the remote repo to your current branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  5. ⬆ &lt;code&gt;git push&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Push your local commits to the remote repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  6. 🕵 &lt;code&gt;git blame&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Show who last modified each line of a file and when.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Use Case:&lt;/strong&gt; Great for debugging or understanding change history.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git blame ML.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  7. ⚔ Merge Conflicts (Concept)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Merge conflicts happen when two branches modify the same part of a file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To simulate a merge conflict:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; new-branch
&lt;span class="c"&gt;# Make changes, commit them&lt;/span&gt;
git checkout main
&lt;span class="c"&gt;# Make conflicting changes&lt;/span&gt;
git merge new-branch
&lt;span class="c"&gt;# Conflict occurs here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll need to manually resolve the conflict in the files and commit the resolution.&lt;/p&gt;




&lt;h3&gt;
  
  
  8. 🌿 &lt;code&gt;git branch&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; List, create, or delete branches.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch             &lt;span class="c"&gt;# List branches  &lt;/span&gt;
git branch feature     &lt;span class="c"&gt;# Create a branch  &lt;/span&gt;
git branch &lt;span class="nt"&gt;-d&lt;/span&gt; feature  &lt;span class="c"&gt;# Delete a branch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  9. 🚀 &lt;code&gt;git checkout -b&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Create and switch to a new branch in one step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; advanced-git-commands
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  10. 📁 &lt;code&gt;.gitignore&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Tell Git which files or folders to ignore in version control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to set up:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;.gitignore&lt;/code&gt; file in your root directory.
&lt;/li&gt;
&lt;li&gt;Add patterns of files or folders to ignore.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.log
node_modules/
.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No command is needed — Git will automatically skip tracking files that match the patterns.&lt;/p&gt;




&lt;h3&gt;
  
  
  💼 Bonus Tip: &lt;code&gt;git stash&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Temporarily save your changes when you're not ready to commit but need to switch branches.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git stash
git stash pop  &lt;span class="c"&gt;# To apply them back&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🔗 Bonus: GitHub Repo
&lt;/h3&gt;

&lt;p&gt;You can check out the repository related to this guide here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/rajaramnivas/24MCR080" rel="noopener noreferrer"&gt;GitHub - 24MCR080&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;These Git commands may look simple, but mastering them gives you better control, cleaner workflows, and confidence when collaborating with teams. Whether you're debugging, exploring history, or working on features — Git's got your back.  &lt;/p&gt;




&lt;p&gt;🙌 Thanks for reading!&lt;br&gt;&lt;br&gt;
If you found this helpful, leave a ❤️ or drop your favorite Git command in the comments!&lt;/p&gt;

&lt;h1&gt;
  
  
  git #github #beginners #productivity #programming
&lt;/h1&gt;

</description>
      <category>beginners</category>
      <category>learning</category>
      <category>git</category>
      <category>programming</category>
    </item>
    <item>
      <title># 🚀 Step-by-Step Git Commands for Beginners (with Visuals)</title>
      <dc:creator>Rajaram Nivas</dc:creator>
      <pubDate>Thu, 24 Apr 2025 01:32:39 +0000</pubDate>
      <link>https://dev.to/rajaram_nivas/-step-by-step-git-commands-for-beginners-with-visuals-5dg7</link>
      <guid>https://dev.to/rajaram_nivas/-step-by-step-git-commands-for-beginners-with-visuals-5dg7</guid>
      <description>&lt;p&gt;If you're just getting started with Git and GitHub, here's a &lt;strong&gt;simple, clear guide&lt;/strong&gt; to walk you through setting up your repository and pushing your changes for the first time!&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Initialize a Git Repository
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🗂️ This creates a new Git repository in your current folder.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Example: initializing in a folder named &lt;code&gt;24MCR080&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  📄 Add a File to the Staging Area
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add 24MCR080-NOTEPAD.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;📌 Stages &lt;code&gt;24MCR080-NOTEPAD.txt&lt;/code&gt; so it's ready to be committed.&lt;/p&gt;


&lt;h2&gt;
  
  
  ✅ Commit the File
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Added Personal Details"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;📝 Creates a snapshot of your project with a commit message.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔍 Check Git Status
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;👀 View which files are staged, modified, or untracked.&lt;/p&gt;


&lt;h2&gt;
  
  
  📜 View Commit Log
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;📚 Shows the history of your commits.&lt;/p&gt;


&lt;h2&gt;
  
  
  🌐 Add a Remote GitHub Repository
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin https://github.com/rajaramnivas/24MCR080.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;🔗 Links your local repository to a GitHub remote.&lt;/p&gt;


&lt;h2&gt;
  
  
  🌿 Check Current Branch
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;🧾 Displays your current branch, typically &lt;code&gt;master&lt;/code&gt; by default.&lt;/p&gt;


&lt;h2&gt;
  
  
  🪄 Rename &lt;code&gt;master&lt;/code&gt; to &lt;code&gt;main&lt;/code&gt; (Optional but Recommended)
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch &lt;span class="nt"&gt;-M&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;🎯 Renames the current branch to &lt;code&gt;main&lt;/code&gt; for consistency with modern standards.&lt;/p&gt;


&lt;h2&gt;
  
  
  ☁️ Push Code to GitHub (First Time)
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;📤 Pushes the &lt;code&gt;main&lt;/code&gt; branch to GitHub and sets it as the default upstream branch.&lt;/p&gt;


&lt;h3&gt;
  
  
  🖼️ Visuals for Reference
&lt;/h3&gt;

&lt;p&gt;Here are some screenshots that help illustrate the steps:&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%2Fid0v1duf1wcapk0gt01n.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%2Fid0v1duf1wcapk0gt01n.png" alt="Git Init &amp;amp; Add" width="800" height="450"&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%2Fceh6s4u1zz6blcjbena7.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%2Fceh6s4u1zz6blcjbena7.png" alt="Git Commit" width="800" height="450"&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%2Faqall06tbbklvtkbou0g.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%2Faqall06tbbklvtkbou0g.png" alt="Git Push" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🔁 Modifying or Adding New Files
&lt;/h2&gt;

&lt;p&gt;When you update existing files or add new ones, repeat the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Your updated message"&lt;/span&gt;
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📌 This ensures all changes are tracked and synced with your GitHub repo.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Conclusion
&lt;/h2&gt;

&lt;p&gt;And that’s it! You’ve successfully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initialized a Git repo&lt;/li&gt;
&lt;li&gt;Committed your work&lt;/li&gt;
&lt;li&gt;Connected to GitHub&lt;/li&gt;
&lt;li&gt;Pushed your project to the cloud! ☁️&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>learning</category>
      <category>github</category>
      <category>git</category>
    </item>
  </channel>
</rss>
