diff --git a/daemon/inertiad/project/deployment.go b/daemon/inertiad/project/deployment.go index 29de09d0..6c7527e9 100644 --- a/daemon/inertiad/project/deployment.go +++ b/daemon/inertiad/project/deployment.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "os" + "path/filepath" "strings" "sync" @@ -109,6 +110,9 @@ func (d *Deployment) Initialize(cfg DeploymentConfig, out io.Writer) error { return err } + // Remove existing git repo if there is one + os.RemoveAll(filepath.Join(d.directory, ".git")) + // Initialize repository d.repo, err = git.InitializeRepository(cfg.RemoteURL, git.RepoOptions{ Directory: d.directory,