# Updating submodules

4 messages from 2008-04-05 to 2008-04-05. Participants: Pat Maddox, Avery Pennarun.
Thread: https://gitlist.dev/t/12998

## Pat Maddox, 2008-04-05 22:46

Subject: Updating submodules
Message-ID: <810a540e0804051546o250bd3e7mf7a20d8f1cc6dcfc@mail.gmail.com>
URL: https://gitlist.dev/e/810a540e0804051546o250bd3e7mf7a20d8f1cc6dcfc%40mail.gmail.com

```
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

```

## Avery Pennarun, 2008-04-05 23:01

Subject: Re: Updating submodules
Message-ID: <32541b130804051601w4f7976cawde47a70e04790511@mail.gmail.com>
URL: https://gitlist.dev/e/32541b130804051601w4f7976cawde47a70e04790511%40mail.gmail.com
In-Reply-To: <810a540e0804051546o250bd3e7mf7a20d8f1cc6dcfc@mail.gmail.com>

```
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

```

## Pat Maddox, 2008-04-05 23:08

Subject: Re: Updating submodules
Message-ID: <810a540e0804051608s6b6580a3vd4bf9ae04c22f3d4@mail.gmail.com>
URL: https://gitlist.dev/e/810a540e0804051608s6b6580a3vd4bf9ae04c22f3d4%40mail.gmail.com
In-Reply-To: <32541b130804051601w4f7976cawde47a70e04790511@mail.gmail.com>

```
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

```

## Avery Pennarun, 2008-04-05 23:11

Subject: Re: Updating submodules
Message-ID: <32541b130804051611q396fcffch79f7ad1e391af73c@mail.gmail.com>
URL: https://gitlist.dev/e/32541b130804051611q396fcffch79f7ad1e391af73c%40mail.gmail.com
In-Reply-To: <810a540e0804051608s6b6580a3vd4bf9ae04c22f3d4@mail.gmail.com>

```
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

```
