Project with submodules: how to manage checkouts?

56 views
Skip to first unread message

Nova

unread,
Jan 28, 2014, 11:56:20 AM1/28/14
to gitext...@googlegroups.com
Hello,

I have a project (PrjA) using one submodule (Sub0).
Everythng is working fine, except that whenever I checkout a branch (or a revision) in the main project (PrjA), the submodule is _not_ automatically updated. What I see in the Git Extensions main window is "Current unstaged changes" that refers to the submodule itself.
The submodule is updated only when I explicitly use the command "Repository" -> "Update all submodules".

What I was expecting is: if a switch to another branch (on PrjA), I'd like to get the version of the submodule the project was pointing at when that branch was created. In other words, I'd like to have a "consistent" snapshot of the project each time I checkout a branch:

As far as I can see, a "git submodule update" is enough to achieve this: am I right?
Next question is: is there an option in Git Extensions to enable this? (i.e. to perform a git submodule update after any checkout)?

I'm using Git Extensions 2.47.3 with git 1.8.5.2 (windows)

Thanks in advance for any reply.

Arkady Shapkin

unread,
Mar 11, 2014, 5:52:24 PM3/11/14
to gitext...@googlegroups.com
Hi,


> As far as I can see, a "git submodule update" is enough to achieve this: am I right?
Yes

> Next question is: is there an option in Git Extensions to enable this? (i.e. to perform a git submodule update after any checkout)?
Version from master branch allow update submodules after checkout

вторник, 28 января 2014 г., 20:56:20 UTC+4 пользователь Nova написал:
Reply all
Reply to author
Forward
0 new messages