Search code examples
gitfilegithubclonegit-clone

Is there a way to clone a repository and automatically replace the duplicated files and dirs in the final directory?


Just like it happens when you copy a dir into another but it already has a dir with that name but you can still copy it and replace the duplicated files with the new ones as well.

When I try to force it it throws me:

fatal: destination path 'rep-2' already exists and is not an empty directory.

Solution

  • I would rename or delete the existing folder first.

    Then I would clone the repository, using the expected folder name.