Skip to content

Better support for git submodules #1822

@rafaelsmgomes

Description

@rafaelsmgomes

Is your feature request related to a problem? Please describe.
Not exactly. When working with submodules, Neogit tells me I have commits under the submodule (points to a new hash). That is good, means I have to commit and push the changes to the submodule.

The problem is then: how do I do that?

Well, I would think that pressing enter on that submodule would drop me into the submodule so that I can review and commit those changes (like it happens on lazygit). But that doens't work. So what I have to do is to quit neovim (or open a new pane), navigate to that submodule directory, open neogit, and now I can commit those changes.

That is not a scalable solution. Specially when I have a lot of submodules. I like how lazygit does it. I can just press enter and it will take me to the submodule's git. I can then see and review all those changes.

Personally, I prefer Neogit's UI and developer experience. But I just have to use lazygit when working with submodules because of this.

It would be even greater if neogit would automatically detect the submodules structure and show them on the top, so I could easily change to and from that git directory.

Describe alternatives you've considered

I haven't thought much about other ways of doing it.

Additional context
Sure. Here is what it shows me when there is a change in the submodule:

Image

and then I press enter on it, it navigates me to the oil directory (that's nice):

Image

But I can't really do anything with this, since if I call neogit again, I'll just get the same screenshot above (the initial neogit status).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions