I'm just reading the code here:
// Before template expansion, .git was removed so that a fresh repo can be initialized; remove it again in case
// some template variable usage has conflicted with this directory and impacts git operations.
if err := root.RemoveAll(".git"); err != nil {
return fmt.Errorf("unable to remove .git folder")
}
Why the `err` isn't carried by the error message? For security? Then maybe log it internally?User/operator can't really fix the problem if you keep giving them information this vague.