0

Allow cloning in existing directory without creating new subdirectory

Cyril Duchon-Doris 2 years ago 0

I am using chezmoi to synchronize files between my computers (dotfile manager) https://www.chezmoi.io/.

For example, suppose I'm working on ~/dev/my_project and I have a dotenv file that I want to  synchronize (~/dev/project1/.env) to my new laptop

Then on my new laptop, after I recover my dotfiles from my previous computer (which creates the project1 folder with my dotenv file), when I try to clone git://xxx/my_project.git to ~/dev/my_project, it detects the folder already exists, and clones into a new subdirectory ~/dev/my_project/my_project.git/ instead of just cloning inside the existing folder (and optionally asking to erase existing files but the .env file is gitignored in my case).

It then becomes nerve-breaking to fix things up.

Can we add an option to clone into an existing directory + even if it has some files ?