Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Using GIT and GIThub with web hosting
This guide explains how to create a GIT repository on both your Web Hosting and your Managed Cloud Server from Infomaniak.
GIT and GitHub are available by default on both of the aforementioned platforms.
As a hosting provider, Infomaniak acts solely as an intermediary and cannot provide additional support on this matter. If needed, you can contact one of our partners or submit a request for proposal for free.
Creating the GIT Repository (on the server)
Setup:
- The GIT repository is located at /git_depot
- The website is in the folder /web/[project] (on your FTP server)
Commands to run:
cdmkdir git_depotcd git_depot/git init --bare [project].gitcd [project].gitgit update-server-info
Pushing the Local Repository to the Server (to be done locally)
Commands to run:
git initgit remote add origin ssh://user@[xxxxx].ftp.infomaniak.com:/home/clients/[123465789]/git_depot/[project].git git statusgit add .git commit -a -m "init"git push --set-upstream origin mastergit push
Cloning the Site to the Server Directory (to be done on the server)
Commands to run:
cdcd webrm -r [project]/git clone /home/clients/[123465789]/git_depot/[project].git [project]/
Link to this FAQ: