This question has already been answered:

I prepared a folder on the server, I pull into it a remote repository through git clone an error occurs:

fatal: destination path '...'

There is a folder with statics, I need it, can I somehow get around this error? Type git clone --force or something else like that.

Reported as a duplicate by participants aleksandr barakin , Alexey Shimansky , Cheg , br3t , Lex Hobbit Aug 14 '17 at 1:30 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

1 answer 1

You can clone to an empty folder and then move it to a folder with static, but then it turns out that the static will fall into the repository itself.

To exclude a folder with statics from version control, add it to the .gitignore file that you create in the root folder, and write just the folder name, like this:

 static 

Then the repository will be next to your folder and it will not be tracked by the version control system.