Support for git-subrepo

alexfouche 4 years ago updated by Andreas Völkel 3 years ago 1

Can SmartGit support git-subrepo ? https://github.com/ingydotnet/git-subrepo

It permits to "embed" git repositories within one as normal files (and not like submodules), so it permits to clone the complete repository like normal and without even needing needing to know about it, branch at will without issues, and yet permits to push and pull changes to these subdirectories from their upstream git repositories. It also does not have the drawbacks of git-subtree.

This command is an improvement from git-submodule and git-subtree; two other git commands with similar goals, but various problems.

It assumes there are 3 main roles of people interacting with a repo, and attempts to serve them all well:

  • owner - The person who authors/owns/maintains a repo.
  • users - People who are just using/installing the repo.
  • collaborators - People who commit code to the repo and subrepos.

The git-subrepo command benefits these roles in the following ways:

  • Simple and intuitive commandline usage.
  • Users get your repo and all your subrepos just by cloning your repo.
  • Users do not need to install git-subrepo, ever.
  • Collaborators do not need to install unless they want to push/pull.
  • Collaborators know when a subdir is a subrepo (it has a .gitrepo file).
  • Well named branches and remotes are generated for manual operations.
  • Owners do not deal with the complications of keeping submodules in sync.
  • Subrepo repositories can contain subrepos themselves.
  • Branching with subrepos JustWorks™.
  • Different branches can have different subrepos in different states, etc.
  • Moving/renaming/deleting a subrepo subdir JustWorks™.
  • You can init an existing subdirectory into a subrepo.
  • Your git history is kept squeaky clean.
  • Upstream history (clone/pull) is condensed into a single commit.
  • You can see the subrepo history with git log subrepo/<subdir>/fetch.
  • Commits pushed back upstream are not condensed.
  • Trivial to try any subrepo operations and then reset back.
  • No configuration required.
  • Does not introduce history that messes up other git commands.
  • Fixes known rebase failures with git-subtree.


In our company we're aiming to use the subrepo approach as well.

AFAIK there's currently no GIT GUI that natively supports the suprepo "feature".

Meaning: In case SmartGit would support the subrepositories in a GUI this would be a unique selling point!

Therefore: A clear vote from my side!