From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: git submodule support feedback
Date: Thu, 26 Apr 2007 12:38:49 +0100 [thread overview]
Message-ID: <200704261238.51234.andyparkins@gmail.com> (raw)
Hello,
I've started using submodule support in one of my projects. I was previously
using my own poorman's submodule support where I kept the commit in a
file, .gitmodules. Git's new submodule support is superior to this method
and doesn't lose me any features over what I had so I thought I'd change.
My general comment is that it's great. I've tried to trip it up a few times,
but it works exactly as one would expect. I was surprised how little I had
to understand in order to make it work, I didn't even need git update-index.
git-add and git-rm work fine when the directory you're adding is a git
repository in itself. Lovely.
I'll report further as I come across any stumbling blocks; but here is one to
get you going: (It's not a problem with git really, and the workaround is
simple, I'm reporting it for your information rather than to get it fixed).
In the master branch I deleted my .gitmodules file and did
$ git add submodule
$ git commit -m "Chuck poorman's-submodule use gitman's-submodule"
This took over the submodule management beautifully. Now, I swapped to
another branch and tried to merge the master branch:
$ git checkout somebranch
$ git merge master
fatal: Updating 'submodule' would lose untracked files in it
Merge with strategy recursive failed.
I appreciate why this has happened - submodule, from the point of view of
git - doesn't exist in that branch, but the directory always has, as that's
where I've kept it as my pseudo-submodule. The fix was to do
$ mv submodule submodule.tmp
$ git merge master
$ rmdir submodule
$ mv submodule.tmp submodule
I bring this up only because anyone who's moving from non-submodule to
submodule support might run into the same problem.
In short: great stuff - this is already more facility than I had, thanks
chaps.
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
next reply other threads:[~2007-04-26 11:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 11:38 Andy Parkins [this message]
2007-04-26 11:56 ` git submodule support feedback Marco Costalba
2007-04-26 12:08 ` Andy Parkins
2007-04-26 21:28 ` Andy Parkins
2007-04-26 20:59 ` David Lang
2007-04-26 21:35 ` Junio C Hamano
2007-04-26 21:49 ` Andy Parkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200704261238.51234.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).