Knowledge base
1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!
Using GIT and GitHub with a Web Hosting
This guide details the creation of a GIT repository both on your Web Hosting and on your Managed Cloud Server.
Preamble
- GIT and GitHub are available by default on the two aforementioned supports.
- If needed, local partners referenced by Infomaniak can handle these procedures: launch a free call for tenders; they handle everything, freeing you from technical details — also discover the role of the host.
Creating the GIT repository
Setup on the server:
- the GIT repository is in
/git_depot - the site is in the folder
/web/[project](in your FTP server)
Commands to enter:
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 machine:
git init
git remote add origin ssh://user@[xxxxx].ftp.infomaniak.com:/home/clients/[123456789]/git_depot/[projet].git
git status
git add .
git commit -a -m "init"
git push --set-upstream origin master
git push
Cloning the site to 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:
Has this FAQ been helpful?