[Development] git submodules

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Tue Dec 31 06:29:02 CET 2013


On Tue, Dec 31, 2013 at 9:19 AM, Jiergir Ogoerg <f35f22fan at gmail.com> wrote:
> Hi,
> the Qt tutorials that explain how to use git don't mention git submodules.

There are quite a few tutorials on the web on git submodules. In a
nutshell, a submodule is an independent git repository that can
reside/be referenced by another git repository. So eg "qt5" is one git
repositroty (with it's own commit history etc) and "qtbase" is another
git repo (with it's independent commit history) which is just 'housed'
inside the qt5 directory. The qt5 dir references a particular commit
of it's submodules.

>
> Is that why after doing changes to some source file "git diff" doesn't
> show the changes as expected from reading this:
> http://qt-project.org/wiki/Git_Introduction

Are you running 'git diff' from the qt5 dir? There's an option to
ignore dirty submodules, but inspecting the '.gitmodules' file, I see
that it's not set (that would've suppressed any changes to show up in
the parent/referencing repo, i.e qt5).

>
> I'm working with the files from
> qt5/qtbase/src/plugins/platforminputcontexts/compose/generator/
>
>
> What commands in git do I have to issue after updating those files for
> them to show up in "git diff"?

Try a 'git status/diff' from the qtbase dir and see what shows up.

You can also try 'git submodule status qtbase'.

HTH,
-mandeep


>
> Git commit doesn't work either btw.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list