Git on Accelerators
This page is a guide to using the Git version control system on Accelerators.
If you're new to Git, or want a general introduction to using Git for version control, start off by reading the Git Overview in the All Accelerators Knowledge Base.
Create a Git Repository
To create a new Git repository on your Accelerator, first edit your ~/.bashrc file and add this to the top:
export PATH=${PATH}:/opt/local/bin
Then run something like:
cd ~ mkdir git mkdir git/myapp.git cd git/myapp.git git --bare init
To push an (existing) app from your local machine up to the remote repository on your accelerator:
cd myapp git init git add . git commit -m "initial import" git remote add origin ssh://login@hostname/home/username/git/myapp.git git push origin master
Sometimes you will require some setup first. Ssh is not so smart with paths, and fails to read .profile or any of the usual suspects to get a proper PATH set, so it typically will fail with the following message:
spacemonkey@localhost$ git push origin master bash: git-receive-pack: command not found fatal: The remote end hung up unexpectedly
For background on this and using shared accelerators, there is a forum thread that covers this information.
If this is your problem as well, you simply need to update your .bashrc in your home directory on your accelerator. The paths are different however based on whether you are using a shared or dedicated accelerator (somebody please verify this on the shared side).
For a web accelerator, you would edit ~/.ssh/environment:
export PATH=/opt/local/libexec/git-core:$PATH
For a shared accelerator, you would edit ~/.bashrc:
export PATH=/usr/local/libexec/git-core:$PATH
At that point your remote push should work as expected.
(Perhaps there's a more standard convention for repositories; feel free to edit this to reflect that.)
