We're migrating from SVN to git and now having the problem that we need any replacement for our svn externals. Unfortunately, submodules are not solving our problems since any change in the submodule requires an update of the parent project. So we found the git-externals repository (see https://github.com/develer-staff/git-externals)
Everything works very well, but when running git externals update
, we're facing the following error message:
externals sanity check passed!
External git-externals
Retrieving changes from server: git-externals
Fetching origin
Checking out branch master
error: Sparse checkout leaves no entry on working directory
<GitError: 1 "git checkout master" None>
I already checked out many other questions/answers regarding this problem here on SO, but nothing worked for me. I'm also not sure which directory I need to pass in when I run echo my-test-dir/* > .git/info/sparse-checkout
because when I run git externals update
, it first checks out the repository to the .git_externals-directory (instead of my-test-dir). So I'm not sure if I need to do echo my-test-dir/* > .git/info/sparse-checkout
or echo .git_externals/* > .git/info/sparse-checkout
. But unfortunately none of them worked till now.
In my case the git_externals.json looks like:
{
"https://github.com/develer-staff/git-externals": {
"branch": "master",
"ref": null,
"targets": {
".": [
"my-test-dir"
]
},
"vcs": "git"
}
}
I simply added the git-externals repo as external.
Is anyone having any idea how I can solve this issue? Or maybe anyone know any other good replacement for replacing svn externals?