<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Git Submodules: Adding, Using, Removing, Updating</title>
	<atom:link href="http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 09:26:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Thiyagarajan Veluchamy</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-18523</link>
		<dc:creator>Thiyagarajan Veluchamy</dc:creator>
		<pubDate>Fri, 03 Feb 2012 08:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-18523</guid>
		<description>Thanks, its helped me to understand the submodule concents.</description>
		<content:encoded><![CDATA[<p>Thanks, its helped me to understand the submodule concents.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jean</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-17431</link>
		<dc:creator>Chris Jean</dc:creator>
		<pubDate>Sat, 10 Dec 2011 13:55:06 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-17431</guid>
		<description>Perhaps &quot;vocation&quot; would have been a better word to use, but profession applies.</description>
		<content:encoded><![CDATA[<p>Perhaps &#8220;vocation&#8221; would have been a better word to use, but profession applies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-17425</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sat, 10 Dec 2011 07:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-17425</guid>
		<description>Wordpress themes? Profession? Oh dear....</description>
		<content:encoded><![CDATA[<p>WordPress themes? Profession? Oh dear&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jean</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-17405</link>
		<dc:creator>Chris Jean</dc:creator>
		<pubDate>Fri, 09 Dec 2011 06:44:54 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-17405</guid>
		<description>A submodule has meaning outside of your local file system. A symlink does not.</description>
		<content:encoded><![CDATA[<p>A submodule has meaning outside of your local file system. A symlink does not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dragonx</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-17400</link>
		<dc:creator>dragonx</dc:creator>
		<pubDate>Fri, 09 Dec 2011 03:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-17400</guid>
		<description>Chris, I&#039;m fairly new to git, I&#039;ve been working with it a bit for a year, but never really getting past the basic checkin of changes, and occasional reverts.  This post was very useful.

I just tried adding an open source python package as a submodule to my project.  The tree structure of the submodule didn&#039;t work well as a subfolder, given the way it was built so that it could be installed via setup.py.

I ended up having it as a separate git repo, and I put a symlink in my main project.

Do you have any comments on why a submodule might be better than just a symlink to another repo?</description>
		<content:encoded><![CDATA[<p>Chris, I&#8217;m fairly new to git, I&#8217;ve been working with it a bit for a year, but never really getting past the basic checkin of changes, and occasional reverts.  This post was very useful.</p>
<p>I just tried adding an open source python package as a submodule to my project.  The tree structure of the submodule didn&#8217;t work well as a subfolder, given the way it was built so that it could be installed via setup.py.</p>
<p>I ended up having it as a separate git repo, and I put a symlink in my main project.</p>
<p>Do you have any comments on why a submodule might be better than just a symlink to another repo?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jean</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-17368</link>
		<dc:creator>Chris Jean</dc:creator>
		<pubDate>Wed, 07 Dec 2011 20:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-17368</guid>
		<description>This is as expected. From the man page for the git submodule update command:

&lt;blockquote&gt;Update the registered submodules, i.e. clone missing submodules and checkout the commit specified in the index of the containing repository. This will make the submodules HEAD be detached unless --rebase or --merge is specified or the key submodule.$name.update is set to rebase or merge.&lt;/blockquote&gt;

Remember when you did the &quot;git submodule add&quot; for the app and app-cli projects how it would have shown that &quot;.gitmodules&quot; was either added or modified and that the path to the submodule was a new file? This process stores the HEAD commit name of the submodule in the parent repository. When you updated the app/modules files, committed, and pushed the changes, doing a &quot;git status&quot; in the app directory should have shown that your module&#039;s path was modified. This is because it now has a new commit. In order to store that new commit name to the parent repository, you need to add the change and commit the change.

Now think about the quoted description above. When you do &quot;git submodule update&quot;, a &quot;git fetch&quot; command will be run for the modules submodule and the commit stored in the parent repository will be checked out. As indicated in the documentation, this can result in a detached HEAD.

So yes, needing to do &quot;git pull&quot; (or &quot;git merge&quot; or &quot;git rebase&quot;) to get the latest changes into your app-cli/modules directory is to be expected, and no, you did not do something wrong.

The biggest difficulty in understanding what the hell is going on with the &quot;git submodule&quot; commands is to understand what a submodule is and what a submodule is not. Writing this post was a way for me to improve my understanding. Essentially, a submodule is nothing more than a pointer to a specific commit of a repository that is connected with a path inside of another repository. A submodule really has nothing to do with files and nothing is automated. If you want a submodule&#039;s repository to update to the latest commit, you have to manually tell Git that you want that.</description>
		<content:encoded><![CDATA[<p>This is as expected. From the man page for the git submodule update command:</p>
<blockquote><p>Update the registered submodules, i.e. clone missing submodules and checkout the commit specified in the index of the containing repository. This will make the submodules HEAD be detached unless &#8211;rebase or &#8211;merge is specified or the key submodule.$name.update is set to rebase or merge.</p></blockquote>
<p>Remember when you did the &#8220;git submodule add&#8221; for the app and app-cli projects how it would have shown that &#8220;.gitmodules&#8221; was either added or modified and that the path to the submodule was a new file? This process stores the HEAD commit name of the submodule in the parent repository. When you updated the app/modules files, committed, and pushed the changes, doing a &#8220;git status&#8221; in the app directory should have shown that your module&#8217;s path was modified. This is because it now has a new commit. In order to store that new commit name to the parent repository, you need to add the change and commit the change.</p>
<p>Now think about the quoted description above. When you do &#8220;git submodule update&#8221;, a &#8220;git fetch&#8221; command will be run for the modules submodule and the commit stored in the parent repository will be checked out. As indicated in the documentation, this can result in a detached HEAD.</p>
<p>So yes, needing to do &#8220;git pull&#8221; (or &#8220;git merge&#8221; or &#8220;git rebase&#8221;) to get the latest changes into your app-cli/modules directory is to be expected, and no, you did not do something wrong.</p>
<p>The biggest difficulty in understanding what the hell is going on with the &#8220;git submodule&#8221; commands is to understand what a submodule is and what a submodule is not. Writing this post was a way for me to improve my understanding. Essentially, a submodule is nothing more than a pointer to a specific commit of a repository that is connected with a path inside of another repository. A submodule really has nothing to do with files and nothing is automated. If you want a submodule&#8217;s repository to update to the latest commit, you have to manually tell Git that you want that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Santos</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-17367</link>
		<dc:creator>Igor Santos</dc:creator>
		<pubDate>Wed, 07 Dec 2011 19:58:05 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-17367</guid>
		<description>Hello!
I have two projects that should share a part of the code. So, I created a submodule. Both projects have the submodule with the master branch. Let&#039;s name them:
app &gt; project 1
app-cli &gt; project 2
models &gt; the submodule (inside app/models and app-cli/models)

I&#039;ve made some changes inside app/models, and inside that folder, I commited and pushed the changes.
After that I entered app-cli and tried to run &quot;git submodules update&quot;, but it did nothing. I needed to enter app-cli/models and do a normal &quot;git pull&quot;.
Is this expected? I did something wrong?</description>
		<content:encoded><![CDATA[<p>Hello!<br />
I have two projects that should share a part of the code. So, I created a submodule. Both projects have the submodule with the master branch. Let&#8217;s name them:<br />
app &gt; project 1<br />
app-cli &gt; project 2<br />
models &gt; the submodule (inside app/models and app-cli/models)</p>
<p>I&#8217;ve made some changes inside app/models, and inside that folder, I commited and pushed the changes.<br />
After that I entered app-cli and tried to run &#8220;git submodules update&#8221;, but it did nothing. I needed to enter app-cli/models and do a normal &#8220;git pull&#8221;.<br />
Is this expected? I did something wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phluks</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-15647</link>
		<dc:creator>phluks</dc:creator>
		<pubDate>Wed, 19 Oct 2011 09:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-15647</guid>
		<description>Yes! Nice.

I needed to get rid of a submodule :)</description>
		<content:encoded><![CDATA[<p>Yes! Nice.</p>
<p>I needed to get rid of a submodule <img src='http://chrisjean.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: richtaur</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-15248</link>
		<dc:creator>richtaur</dc:creator>
		<pubDate>Wed, 28 Sep 2011 22:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-15248</guid>
		<description>Thanks for writing this, very helpful! Here&#039;s a tip someone taught me recently. You can combine commands:

  git submodule update --init

Cheers!</description>
		<content:encoded><![CDATA[<p>Thanks for writing this, very helpful! Here&#8217;s a tip someone taught me recently. You can combine commands:</p>
<p>  git submodule update &#8211;init</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Jean</title>
		<link>http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/comment-page-1/#comment-14387</link>
		<dc:creator>Chris Jean</dc:creator>
		<pubDate>Fri, 19 Aug 2011 15:40:11 +0000</pubDate>
		<guid isPermaLink="false">http://gaarai.com/?p=1423#comment-14387</guid>
		<description>While I haven&#039;t done this myself, you might look at making a remote repository for yourself that is a clone of the repo that you want to modify. You can then add your remote repository as the source for your submodule.

You can then use whatever workflow you want when working with that remote repository. You can do pulls against the original source, merge as desired, and do your updates as desired. After committing these changes, you can then pull down the changes to your repository/repositories that use this repo as a submodule.</description>
		<content:encoded><![CDATA[<p>While I haven&#8217;t done this myself, you might look at making a remote repository for yourself that is a clone of the repo that you want to modify. You can then add your remote repository as the source for your submodule.</p>
<p>You can then use whatever workflow you want when working with that remote repository. You can do pulls against the original source, merge as desired, and do your updates as desired. After committing these changes, you can then pull down the changes to your repository/repositories that use this repo as a submodule.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

