Answer the question
In order to leave comments, you need to log in
How to separate repositories into directories using git?
Greetings.
In studying Git, a question arose, on the server, for example, there are 2 directories: the root - production and in the root - test (test directory). It is required, of course, to work with the test (working) directory, but how to correctly initialize the repositories, so that later they can be pulled from the test directory to production?
Initialize in root? It turns out /http/.git , then clone /http/.git or /http/ (what exactly, I don’t understand) to /http/test (how to clone here? I found in one manual
git clone --bare ~/domains/my-site.ru ~/git/my-site.ru.git
but I don’t understand these paths, the first path is the full path to the root, and the second is the full path to the .git folder in the root and the name of the new repository or the path to the /http/test/ folder and the name of the new repository)?
Answer the question
In order to leave comments, you need to log in
On the server, you should have (in your mind) a bare repository, to which you will checkout into production and test from the deploy and test branches, respectively.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question