Question

I am trying out basic submodule functionality in Git Extensions. I have a repository called "sub" and a repository called "super"; sub is a submodule of super.

When I open the super repository in Git Extensions, I can view the history of it and do normal stuff in it as usual. I would like to work with the submodule repository. How do I do this with Git Extensions?

Under the Submodules menu, I found the promising "Browse submodule" menu with an entry for "sub". But when I click sub, Git Extensions only refreshes the super project repository. It doesn't switch to the submodule repository.

Basically what I want to do is have Git Extensions show me the submodule repository and let me do commits in it, branch it, push/pull it, etc. How do I do that?

Was it helpful?

Solution

I asked this on the Git Extensions mailing list. Turns out this was a new bug in Git Extensions caused by the latest version of msysgit. It should be fixed in a future version of Git Extensions (fix has already been merged into the main Git Extensions repository on GitHub).

OTHER TIPS

Current version of Git Extensions (2.43) has address line on its toolbar. So you can simply change current repository with the help of this line.

But also, there is a button with a blue symbol near that line. This button do exactly what you want. Just click this button and select the desired submodule to browse.

If you current repository has a super repository it will be shown in that list too. So this is very useful feature which allows you to change between repositories of the submodules.

Not sure about the git extension part, but you need to change directory to the sub-module directory (it is an independent repository!) before you can commit those changes.

But, you do need to create a branch first to hold the commit because the sub-module repo is in a 'detached head' state - that is it is at a specific commit, not at the head of a branch. If you don't then the next submodule update will not only over-write your changes, but you won't have any easy way of finding your previous changes that you may wish to merge into them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top