Sublime Forum

How to update registered submodules with Sublime Merge?

#1

Haven’t figured out how do I fetch updates for registered submodules inside a git directory?

3 Likes

#2

you could try opening the submodule folder directly in Merge for now, until more submodule handling support is added

0 Likes

#3

SM doesn’t yet support submodules.

It doesn’t pull/update/… them.

Changed, updated ones are not listed as modified, but appear after stash all only.

0 Likes

#4

Not to revive a dead thread, but has their been any updates on this? This is rather important for me.

0 Likes

#5

I do it this way

In my .gitconfig

# Pull all repos
  pullall = !git pull && git pullsub
  pullsub = submodule foreach --recursive git pull

# Fetch all repos
  fetchall = !git fetch --all && git fetchsub
  fetchsub = submodule foreach --recursive git fetch --all

In /home/<>/.config/sublime-merge/Packages/User/ Default.sublime-commands

  [
    {
        "caption": "pullall - pull repo and submodules",
        "command": "git",
        "args": {"argv": ["pullall"]}
    },
    {
        "caption": "fetchall - fetch --all repo and submodules",
        "command": "git",
        "args": {"argv": ["fetchall"]}
    }
]
0 Likes

Ability to execute local git subcommands
#6

Ah thanks that was very helpful. I actually just modified yours a bit to just do the one command in Default.sublime-commands:

[
    {
        "caption": "subupdate - update submodules",
        "command": "git",
        "args": {"argv": ["submodule", "update", "--recursive", "--init"]}
    }
]
1 Like