Answer the question
In order to leave comments, you need to log in
How to set up Git on hosting?
I did everything the same as here git-scm.com/book/ca/v1/Git-on-the-Server-Getting-G... But this line got an error $ scp -r my_project.git [email protected] .com:/opt/git. What am I doing wrong? Can you explain everything in detail plz
Answer the question
In order to leave comments, you need to log in
I read above in the comments about the scheme in which the server immediately deploys files to the hosting. I'll try to bring some clarity.
A remote Git server is set up a little differently than your local repository. The server does not store the working tree, only the git files. That is, there is only what is in your .git folder, but the project files themselves are not. They would take up too much space.
If I understand correctly, you need the remote server to upload files somewhere on the hosting when the push is completed. I think this can be implemented through git hooks on the server side. Read here:
git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
And here is another article on Habré that describes the solution.
habrahabr.ru/post/178965
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question