<?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: Jegadeep Pandiarajan</title>
    <description>The latest articles on DEV Community by Jegadeep Pandiarajan (@jegadeep_pandiarajan_253d).</description>
    <link>https://dev.to/jegadeep_pandiarajan_253d</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%2F3082067%2F32233ab4-da1b-4450-a71e-63c1ca818c0a.png</url>
      <title>DEV Community: Jegadeep Pandiarajan</title>
      <link>https://dev.to/jegadeep_pandiarajan_253d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jegadeep_pandiarajan_253d"/>
    <language>en</language>
    <item>
      <title>Advanced Git and GitHub Commands</title>
      <dc:creator>Jegadeep Pandiarajan</dc:creator>
      <pubDate>Mon, 28 Apr 2025 16:01:51 +0000</pubDate>
      <link>https://dev.to/jegadeep_pandiarajan_253d/advanced-git-and-github-commands-3jef</link>
      <guid>https://dev.to/jegadeep_pandiarajan_253d/advanced-git-and-github-commands-3jef</guid>
      <description>&lt;p&gt;Version control is at the heart of modern software development, and Git is the undisputed leader. While most developers are comfortable with basic Git commands like &lt;strong&gt;clone, add, commit,&lt;/strong&gt; and &lt;strong&gt;push, mastering advanced Git and GitHub commands&lt;/strong&gt; can dramatically improve your workflow.&lt;/p&gt;

&lt;p&gt;In this guide, we’ll dive into some essential advanced Git and GitHub commands that every developer should know.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Clone a Specific Branch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of cloning the entire repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone --branch branch_name --single-branch https://github.com/user/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only the specified branch is downloaded, saving time and space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Stash Changes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Save your local modifications without committing them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Amend Last Commit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Made a small mistake in your last commit? Just amend it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit --amend

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lets you modify the last commit message or add forgotten changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Squash Commits (Interactive Rebase)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To combine multiple commits into one (clean up your commit history):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git rebase -i HEAD~n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace n with the number of commits you want to review.&lt;/p&gt;

&lt;p&gt;Choose squash (or s) for commits you want to merge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Force Push Changes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you have rebased or amended commits:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push --force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;** Caution:** Force pushing can overwrite history, so use it carefully, especially on shared branches!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Create and Track a New Branch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a branch and immediately switch to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout -b new-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Push and set upstream:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push -u origin new-branch-name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;7. Fetch and Prune Deleted Remote Branches&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keep your local references clean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git fetch -p
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Removes references to remote branches that no longer exist.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. View Detailed Commit History&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a cleaner log with graph-like visualization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git log --oneline --graph --all --decorate

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great for visualizing branch merges and commit history.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Cherry-pick Specific Commits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apply a single commit from another branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git cherry-pick commit_hash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Useful when you need only one feature or fix without merging the entire branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. Revert a Commit (Without Losing History)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you need to undo a commit without deleting history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git revert commit_hash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It creates a new commit that undoes the changes.&lt;/p&gt;

&lt;p&gt;Mastering these advanced Git commands can take your productivity to the next level and help maintain a cleaner, more professional project history. Whether you're working on solo projects or collaborating in teams, becoming a Git power user is a career-defining skill. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>DockerFile Image Creation and Pushing to DockerHub</title>
      <dc:creator>Jegadeep Pandiarajan</dc:creator>
      <pubDate>Mon, 28 Apr 2025 15:38:35 +0000</pubDate>
      <link>https://dev.to/jegadeep_pandiarajan_253d/dockerfile-image-creation-and-pushing-to-dockerhub-2jkc</link>
      <guid>https://dev.to/jegadeep_pandiarajan_253d/dockerfile-image-creation-and-pushing-to-dockerhub-2jkc</guid>
      <description>&lt;p&gt;Whether you're a developer automating deployments or a student getting started with DevOps, learning how to create Docker images and push them to DockerHub is essential. &lt;/p&gt;

&lt;p&gt;In this post, we’ll walk through:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Writing a simple Dockerfile&lt;/li&gt;
&lt;li&gt;Building a Docker image&lt;/li&gt;
&lt;li&gt;Tagging the image&lt;/li&gt;
&lt;li&gt;Pushing it to DockerHub&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let’s get started!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Dockerfile?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Dockerfile is a plain text file that contains instructions on how to build a Docker image. Think of it as a recipe — it tells Docker how to build an environment tailored for your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dockerfile&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;FROM python:3.14.0a7-alpine3.21

# Install required system dependencies
RUN apk add --no-cache build-base musl-dev linux-headers

# Install Python libraries
RUN pip install --upgrade pip &amp;amp;&amp;amp; \
    pip install pandas scikit-learn matplotlib

# Copy and run your script
COPY . .
CMD [ "python", "hello_world_ml.py" ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;1. Build the Docker Image&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;docker build -t DockerUserName/dockerfilename:latest .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Run the Docker Image&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;docker run --rm DockerUserName/dockerfilename:latest&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. List Docker Images&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;docker image ls&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Push the Image to DockerHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;docker push DockerUserName/dockerfilename:latest&lt;/p&gt;

</description>
    </item>
    <item>
      <title>GITHUB COMMANDS!</title>
      <dc:creator>Jegadeep Pandiarajan</dc:creator>
      <pubDate>Fri, 25 Apr 2025 15:45:35 +0000</pubDate>
      <link>https://dev.to/jegadeep_pandiarajan_253d/github-commands-4ci4</link>
      <guid>https://dev.to/jegadeep_pandiarajan_253d/github-commands-4ci4</guid>
      <description>&lt;p&gt;Step-by-Step Git Commands Execution:&lt;br&gt;
Initialize a Git repository:&lt;br&gt;&lt;br&gt;
    &lt;code&gt;git init&lt;/code&gt;&lt;br&gt;
Creates a new Git repository in the folder 24MCR045.&lt;/p&gt;

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

&lt;p&gt;Commit the file:&lt;br&gt;
    &lt;code&gt;git commit -m "Added Personal Details"&lt;/code&gt;&lt;br&gt;
Creates a commit with the message "Added Personal Details".&lt;/p&gt;

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

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

&lt;p&gt;Add remote GitHub repository:&lt;br&gt;
     &lt;code&gt;git remote add origin https://github.com/jegadeeppandiarajan/24mcr045.git&lt;/code&gt;&lt;br&gt;
Links the local repository to a remote GitHub repo.&lt;/p&gt;

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

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

&lt;p&gt;Set Git global config for email and username:&lt;br&gt;
    &lt;code&gt;git config --global user.email "jegadeeppandiarajan2003@gmail.com"&lt;/code&gt;&lt;br&gt;
        &lt;code&gt;git config --global user.name "jegadeeppandiarajan"&lt;/code&gt;&lt;br&gt;
Sets your global Git identity.&lt;/p&gt;

&lt;p&gt;Push code to remote repo for the first time:&lt;br&gt;
     &lt;code&gt;git push -u origin main&lt;/code&gt;&lt;br&gt;
Pushes the main branch to GitHub and sets upstream tracking.&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;br&gt;
&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>
