git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cliff Brake <cliff.brake@gmail.com>
To: git@vger.kernel.org
Subject: submodule questions
Date: Fri, 28 May 2010 16:45:10 -0400	[thread overview]
Message-ID: <AANLkTilWHMkf5e7PBgnrI1tsGUYOldnv6AWKU3GG02u2@mail.gmail.com> (raw)

Hello,

I've been trying to understand git submodules.

1) What is the purpose for the submodule lines in .git/config?
2) should 'git submodule sync' update the .git/config with submodule
info, or what exactly does 'git submodule sync' do?

I read the following:
http://therealadam.com/archive/2008/05/08/changing-git-submodule-urls/
 The author claims that:

    * Fork/create your own version of the submodule in question
    * Change the URL for the submodule in .git/config and .gitmodules
    * Cross your fingers and hope for the best

Does not work, but in my experience it does.  On machine #1, I did the
following:

1) created a new branch in the submodule dir, pushed the changes to a new repo.
2) modified .gitmodules to point to the new repo
3) push the changes in the parent repo

On Machine #2:

1) git pull
2) git submodules sync
3) git submodules update

Everything seemed to work.  However, the .git/config submodule entry
still points to the old location, even though 'git submodule update'
seemed to work.  Hence my confusion about what .git/config submodule
entries are for.

Thanks,
Cliff

                 reply	other threads:[~2010-05-28 20:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=AANLkTilWHMkf5e7PBgnrI1tsGUYOldnv6AWKU3GG02u2@mail.gmail.com \
    --to=cliff.brake@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).