A
A
Automat2017-08-12 09:22:26
git
Automat, 2017-08-12 09:22:26

How to copy a repository?

On the web server there is a folder domain.ruin it a folder web
I go to domain.ru command:
git init
Then:
git remote add ....git
I clone the repository into the web folder Everything is copied, but the .git folder was also created in the web folder, why? I just created it here. How to leave .git in domain.ru and pull clean project files in the web?
git clone https://...../name.git web

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Movchan, 2017-08-12
@nomotrack

On the first request , git separate working directory found the answer :
You will have to specify additional parameters with each call git, but you can, of course, make yourself an alias: Or, if you use other repositories that do not need this behavior: PS The same link is and other solutions.

V
Viktor Yanyshev, 2017-08-12
@villiwalla

git clone ...... ./ - clone without root folder
Git is local and remote so there is a .git folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question