Open Tynukua opened 1 month ago
GitGetter.update fails if repo contains submodule
package main import ( "github.com/hashicorp/go-getter" "log" "os" ) func main() { repoURL := "git@github.com:mayraamaral/submodule-father.git" // repo contains submodule destDir := "repo" for i := 0; i < 2; i++ { err := getter.GetAny(destDir, repoURL) // fails when i == 1 if err != nil { log.Println(err) } } }
problem caused by rm .git but submodules have own .git modules the solution cud be
git pull --rebase
GitGetter.update fails if repo contains submodule