<?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: Deepak Sharma</title>
    <description>The latest articles on DEV Community by Deepak Sharma (@dipu-developer).</description>
    <link>https://dev.to/dipu-developer</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%2F3967511%2F369f3cf6-2d82-401e-a0a5-94f2edb01ada.jpg</url>
      <title>DEV Community: Deepak Sharma</title>
      <link>https://dev.to/dipu-developer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dipu-developer"/>
    <language>en</language>
    <item>
      <title>How to Update a Git Submodule to a New Commit?</title>
      <dc:creator>Deepak Sharma</dc:creator>
      <pubDate>Thu, 04 Jun 2026 05:17:38 +0000</pubDate>
      <link>https://dev.to/dipu-developer/how-to-update-a-git-submodule-to-a-new-commit-23p1</link>
      <guid>https://dev.to/dipu-developer/how-to-update-a-git-submodule-to-a-new-commit-23p1</guid>
      <description>&lt;p&gt;Updating a Git submodule to the latest commit point (the latest version of the submodule repository) is straightforward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Go inside the submodule folder.&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;cd path/to/submodule&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pull the latest changes (or checkout a specific commit)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git pull origin main&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git checkout &amp;lt;commit-hash&amp;gt;&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;git checkout 8fd91c2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will update your repo on that commit or branch. Prefer to use the commit point.&lt;/p&gt;

&lt;p&gt;Go back to the parent repo&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd ../../&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the updated submodule reference&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add path/to/submodule&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Commit the updated submodule “pointer”&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git commit -m “Updated submodule to latest commit”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Push the update&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Actually Happens?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A submodule stores only a commit reference to another repository.&lt;br&gt;
So when you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pull/update inside the submodule&lt;/li&gt;
&lt;li&gt;Then commit in the parent repo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…you are updating which commit the parent repo points to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contact for More Information&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you need further clarification or assistance with Grafana customization, feel free to connect with me on LinkedIn.&lt;/p&gt;

&lt;p&gt;I would be happy to discuss this topic in more detail or help with implementation.&lt;/p&gt;

&lt;p&gt;LinkedIn: (&lt;a href="https://www.linkedin.com/in/dipu--developer" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/dipu--developer&lt;/a&gt;) (Deepak Sharma)&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
