T
T
Talgat Baltasov2015-05-12 09:45:21
git
Talgat Baltasov, 2015-05-12 09:45:21

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

3 answer(s)
S
sokolnikov, 2015-05-12
@talgatbaltasov

What mistake?

N
Nikolai Volynkin, 2015-05-14
@nick_volynkin

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

S
Sergey, 2015-05-12
@serega_kaktus

Write to /opt/git is most likely forbidden. use sudo /su

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question