How would you set up Git (or any other versioning control) on shared hosting?

Joined
Jan 20, 2016
Messages
10
Likes
3
Degree
0
How would you set up Git (or any other versioning control) on shared hosting (e.g. BlueHost) or others in a easy way?
 
@Faust

Unless you can get root on your shared hosting would mean you can't do this. At least I've never seen it on a shared hosting environment.

So the decision starts becoming should you just have someone host it, or do it yourself?

If you have no Linux admin skills, a good option is simply getting a paid account on Github which will allow you to have private repos. It's only $7/mo for private repos. Good for most people honestly.

If keeping your stuff off of others infrastructure is important, you can set up Gitlab on your own server . The packages basically install themselves. Pricing varies, but prob $20 or less a month if you do it yourself.

Also could go over to Digital Ocean and you their one click installer for Gitlab. Pricing based on what droplet you chose.

There are of course other options to just installing git on a server and using that, but seems a bit out of scope here.
 
GitHub + hosting a static site there is a great way to start easing into version control + pushing to a remote host. It eliminates the need to worry about server setup and management, which is always filled with tons of "time-wasting" efforts to get one sidetracked. GitHub + GitHub hosting + Jekyll has made for a good combo for a lot of people, though it really depends on your site needs. If it's a simple site that does not need a high degree of dynamic functionality, and you simply need a home for static content, definitely worth considering.

Bitbucket is good too, and is similar in nature, though I'm not sure what hosting options there might be as I don't use it much at all.
 
I'm not saying Bitbucket is bad, but there is a reason I did not mention it. Like a lot of services, anything free means you are the product (or your code is). That and in an actual professional sense Github is the clear choice between most business I've worked with. It is clear looking at Bitbucket that their goal is to get you in to their eco-system. Good, bad, indifferent, that is up to you.
 
@Rageix
Github is free as well, you only have to pay for private repositories.
Your arguments against bitbucket also apply to GitHub.
 
How would you set up Git (or any other versioning control) on shared hosting (e.g. BlueHost) or others in a easy way?

Unless you can get root on your shared hosting would mean you can't do this. At least I've never seen it on a shared hosting environment.

I do it, on my shared hosting environment (I'm poor lol). Quite straightforward, just `git init --bare` in a directory in your shared hosting (I use bluehost), then checkout the repository to your local machine using ssh. It all just goes over ssh urls.

One of the remotes in my local instance:
Code:
production      ssh://[my-username]@[my-shared-hosting-domain].com/home2/[my-username]/src/[repository-name].git (fetch)
production      ssh://[my-username]@[my-shared-hosting-domain].com/home2/[my-username]/src/[repository-name].git (push)
 
Back