Answer the question
In order to leave comments, you need to log in
How to get the files of the git repository of one of the branches on the server?
Good day!
Tell me, how can I copy the files of one of the branches (for example, master) from the git repository on the server (Debian) so that they can be used in nginx or apache in the future?
The essence of the problem is as follows: the site and the git repository are located on the server at once. I need, at certain times, to copy files from git to the folder with the site.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
it all depends on how the repository on the server is organized.
if it is bare, then you just need to clone it into the directory with the site
cd /var/www
git clone -b master /home/user/git/reponame.git
and subsequent updates via git fetch Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question