Submodules use a specific commit, not a branch.  If you need to change the
submodule around create a branch, check it out, do your stuff, and the
commit the submodule change in the parent repo.

On Sat, Mar 27, 2010 at 6:22 PM, Alberto Leal <[email protected]> wrote:

> Hi All,
>
> I'm playing with 'git submodule'. I have just run into a problem, as a
> matter of fact, I'm not pretty sure if this is a problem actually.
>
> I've created a project (added some files and a submodule {another git
> repository} ) push it to Github.
>
> Then, from another terminal - simulating another developer, I've cloned
> that project and run the commands below to get the submodule files:
>
> Albertos-MacBook:oi albertoleal$* git submodule init*
> Submodule 'frameworkX' ([email protected]:albertoleal/frameworkX.git)
> registered for path 'frameworkX'
> Albertos-MacBook:ProjetoT albertoleal$ *git submodule update*
> Initialized empty Git repository in
> /Users/albertoleal/git_submodule/oi/ProjetoT/frameworkX/.git/
> remote: Counting objects: 6, done.
> remote: Compressing objects: 100% (3/3), done.
> remote: Total 6 (delta 0), reused 0 (delta 0)
> Receiving objects: 100% (6/6), done.
> git statusSubmodule path 'frameworkX': checked out
> 'dd40b49d9494dfd3df286a588103e3cf183684a7'
> Albertos-MacBook:ProjetoT albertoleal$ *cd frameworkX/*
> Albertos-MacBook:frameworkX albertoleal$ *git status*
> *# Not currently on any branch.*
> nothing to commit (working directory clean)
> Albertos-MacBook:frameworkX albertoleal$ git branch
> * (no branch)
>   master
>
>
> I'm surprise to see I'm not on any branch. Shouldn't I be on master branch?
>
> Thanks in advance,
> --
> Alberto Leal
>
>  --
> You received this message because you are subscribed to the Google Groups
> "GitHub" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<github%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/github?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"GitHub" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/github?hl=en.

Reply via email to