git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Updating submodules
@ 2008-04-05 22:46 Pat Maddox
  2008-04-05 23:01 ` Avery Pennarun
  0 siblings, 1 reply; 5+ messages in thread
From: Pat Maddox @ 2008-04-05 22:46 UTC (permalink / raw)
  To: git

Do I need to cd into each submodule dir and fetch/rebase?  git
submodule update doesn't seem to do anything, though I would assume
it's used to update the submodules...

Pat

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Updating submodules
  2008-04-05 22:46 Updating submodules Pat Maddox
@ 2008-04-05 23:01 ` Avery Pennarun
  2008-04-05 23:08   ` Pat Maddox
  0 siblings, 1 reply; 5+ messages in thread
From: Avery Pennarun @ 2008-04-05 23:01 UTC (permalink / raw)
  To: Pat Maddox; +Cc: git

On 4/5/08, Pat Maddox <pergesu@gmail.com> wrote:
> Do I need to cd into each submodule dir and fetch/rebase?  git
>  submodule update doesn't seem to do anything, though I would assume
>  it's used to update the submodules...

"git submodule update" updates each submodule to the version that was
checked into the supermodule.  It doesn't do anything like fetch,
rebase, or pull.

Avery

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Updating submodules
  2008-04-05 23:01 ` Avery Pennarun
@ 2008-04-05 23:08   ` Pat Maddox
  2008-04-05 23:11     ` Avery Pennarun
  0 siblings, 1 reply; 5+ messages in thread
From: Pat Maddox @ 2008-04-05 23:08 UTC (permalink / raw)
  To: Avery Pennarun; +Cc: git

On Sat, Apr 5, 2008 at 4:01 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
>
> On 4/5/08, Pat Maddox <pergesu@gmail.com> wrote:
>  > Do I need to cd into each submodule dir and fetch/rebase?  git
>  >  submodule update doesn't seem to do anything, though I would assume
>  >  it's used to update the submodules...
>
>  "git submodule update" updates each submodule to the version that was
>  checked into the supermodule.  It doesn't do anything like fetch,
>  rebase, or pull.

Okay.  So I've got a parent repo with three submodules.  I've been
working in one submodule and have been committing changes.  Now I
wanted to get the latest changes upstream...I have to rebase that repo
individually, right?

Pat

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Updating submodules
  2008-04-05 23:08   ` Pat Maddox
@ 2008-04-05 23:11     ` Avery Pennarun
  0 siblings, 0 replies; 5+ messages in thread
From: Avery Pennarun @ 2008-04-05 23:11 UTC (permalink / raw)
  To: Pat Maddox; +Cc: git

On 4/5/08, Pat Maddox <pergesu@gmail.com> wrote:
> On Sat, Apr 5, 2008 at 4:01 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
>  >
>  > On 4/5/08, Pat Maddox <pergesu@gmail.com> wrote:
>  >  > Do I need to cd into each submodule dir and fetch/rebase?  git
>  >  >  submodule update doesn't seem to do anything, though I would assume
>  >  >  it's used to update the submodules...
>  >
>  >  "git submodule update" updates each submodule to the version that was
>  >  checked into the supermodule.  It doesn't do anything like fetch,
>  >  rebase, or pull.
>
> Okay.  So I've got a parent repo with three submodules.  I've been
>  working in one submodule and have been committing changes.  Now I
>  wanted to get the latest changes upstream...I have to rebase that repo
>  individually, right?

Yes.  Be careful of which branch your submodule is on; if "git
submodule update" has done anything in the past, you might not be on a
branch at all, in which case you have to create a local branch with
your changes before you can safely rebase or push.

Avery

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Updating Submodules
@ 2008-10-15  5:51 benhill
  0 siblings, 0 replies; 5+ messages in thread
From: benhill @ 2008-10-15  5:51 UTC (permalink / raw)
  To: git


Heyah Folks.

So I have been playing with this for a few hours, and I must be missing
something.

I have created a submodule in my super project with the standard commands:

git submodule add <repo> <path>

No problem.  Repo Loads.  I push it to origin (github) and the little arrow
designating it as a sub is there.

Then one of my colleagues checks out the super and runs:

git submodule init
git submodule add

...no problems thus far...the repo loads as planned.

The she makes some changes to the submodule, checks them in, pushes them to
origin (also github).

Now, if she tried to check in changes to the super...it is no longer just
the submodule ref that she is checking in...but the whole tree....like it
adds all the files in the submodule to the super...if she were to push to
github, the little arrow would be gone..and the whole tree is there.  

What am I doing wrong here?  How do you make updates to supers to point to
the head revision of the sub?

Thanks for any help.

Ben
-- 
View this message in context: http://www.nabble.com/Updating-Submodules-tp19987153p19987153.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-15  5:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15  5:51 Updating Submodules benhill
  -- strict thread matches above, loose matches on Subject: below --
2008-04-05 22:46 Updating submodules Pat Maddox
2008-04-05 23:01 ` Avery Pennarun
2008-04-05 23:08   ` Pat Maddox
2008-04-05 23:11     ` Avery Pennarun

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).