Can I use the git client software with your Web hosting service?
Our servers have the git version control software client installed. Technically advanced users can use git with any of our hosting plans.
Running the git command (git)
To run git, first login at the command line shell, then type git with the appropriate options. For example:
git help
The most common use of git will be to “fetch” or “clone” copies of other files from remote locations. The recommend commands and URLs involved for this should be provided from the original source of the files.
As an example, the most popular git hosting website github.com provides their own detailed documentation for working with repositories which you can view here. Instructions for files in a Bitbucket hosted repository can be found here.
Can I use my site as a git server?
You can set up a git repository on your server with us that you access via an SSH shell connection.
After connecting to the shell, you would first use commands like this to create the git repository on the server:
mkdir gitproject.git cd gitproject.git git init --bare
Then, back on your computer, you could create a new project and tell git that the remote origin is on your site:
mkdir project cd project git init echo test > testfile git add . git remote add origin example.com@example.com:~/gitproject.git git push origin master
After that, you could erase your local copy of the "project" directory and use "git clone" to get it back, and it should work as you expect, showing your "testfile":
git clone example.com@example.com:~/project.git
(You’ll probably want to set up SSH keys to avoid having to type your account password repeatedly.)
Copyright © 2000-2024 Tiger Technologies LLC