问题
How do I create a git repo on my shared hostgator? Got SSH access by the way.
回答1:
Assuming Git is installed...
git init --bare /path/to/repo
If Git isn't installed, you won't be able to push directly to the hosted repository, but you can make a snapshot available by doing the following (from here):
First, on your local machine, run these commands (this assumes your repo is at ~/foo
locally):
git clone --bare ~/foo ~/foo.git
cd ~/foo.git
git --bare update-server-info
Then, copy the resulting foo.git
directory into your webserver's public_html
directory. After doing so, you should be able to pull from the http://yourserver.com/you/foo.git or the like. Any time you want to update the snapshot, you'd need to repeat the above steps.
来源:https://stackoverflow.com/questions/9593183/how-do-i-create-a-git-repo-on-my-shared-hostgator