0

We're trying to switch from SVN to GIT, therefore I'm evaluating GIT submodules. Since I always want to pull the latest version of submodules I followed this answer and set the following repo config value:

git config --local submodule.recurse true

I checked the appropriate .git\config file, and the value is set to true.

If I perform a git status I don't see any unstaged changes. Therefore I'm not able to commit and push the change. I want to share this behavior (between our developers) on repo level.

Is it possible to push such repo configs to the remote?

I also published the repo to GitHub.

Thx.

Moerwald
  • 10,448
  • 9
  • 43
  • 83

1 Answers1

1

You cannot share a Git config by Git itself. You need to manage the sharing yourself using a shared filesystem. Then you can just symlink the shared config.

As an alternative you can versionize a shared Git config in a separate Git repository. But notice that the Git config of this repository (not the one in your working copy) would be local again.

Because you just want to initialize all the submodules, I'd recommend to just do this by hand in CLI. Most of the Git GUI do this for you automatically. So I recommend to not overthink the sharing of the Git config here.

Marc
  • 2,900
  • 3
  • 26
  • 40
  • ["another topic"], so I'll also not be able to share a commit template between several devs via GIT, correct? Thx – Moerwald Feb 28 '19 at 10:16
  • You can but only by "tricks" as mentioned above, not as a Git feature. – Marc Feb 28 '19 at 10:22