Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Using GIT and GIThub with web hosting
This guide details the creation of a GIT repository as well on your Web hosting that on your Cloud Server Infomaniak.
Preamble
- GIT and GITHub are available by default on the above 2 media.
- For additional assistance contact a partner or launch a call for tenders free of charge — discover also the role of the host.
Creation of the GIT repository
Setting up, on the server:
- the GIT deposit is on
/git_depot
- the site is in the folder
/web/[projet]
(on your FTP server)
Control lines to be indicated:
cd
mkdir git_depot
cd git_depot/
git init --bare [projet].git
cd [projet].git
git update-server-info
Sending the local repository to the server
To do on the local post:
git init
git remote add origin ssh://user@[xxxxx].ftp.infomaniak.com:/home/clients/[123465789]/git_depot/[projet].git
git status
git add .
git commit -a -m "init"
git push --set-upstream origin master
git push
Cloning the site on the server directory
To do on the server:
cd
cd web
rm -r [projet]/
git clone /home/clients/[123465789]/git_depot/[projet].git [projet]/
Link to this FAQ: