PDA

View Full Version : how to clone a git directory



mdgrech
05-08-2009, 03:55 PM
the dir I want to clone is ~/rails/interviews.git

From my local computer I tried issuing:

git clone username@vegthreads.org:~/rails/interviews.git

but that didnt work please post the clone.

mdgrech
05-08-2009, 07:00 PM
Ok I answered my own question. Also the directory was actually ~/rails/interviews/.git which is probably how yours will be as well so be careful but heres the answer:

git clone ssh://vegthrea@vegthreads.org/~/rails/interviews/.git/

This site helped, but its in japanese:
http://blog.tech4k.com/?p=199

atoms
05-09-2009, 10:43 AM
I'm using this to sync up a local clone once I've cloned it:

git pull -tv ssh://username@domain.com/home/userName/pathTo/rails/projectName/.git master

-v verbose
-t gets all tags

I'm not sure if this is the best way to go about it, but it is working for me.

mdgrech
05-09-2009, 04:37 PM
is there suppose to be a space betweet the .git and master? Also anyone tried this out for literally pushing to server:

http://joemaller.com/2008/11/25/a-web-focused-git-workflow/

mdgrech
05-09-2009, 06:16 PM
I finally got Joe Mallers tutorial working on hostmonster which means that git push from my local machine automatically updates the live server which is sick! If i make live changes on the server when I git pull from my local machine those changes will show up. To get Joe's tutorial I had to chmod to executable post-commit and post-update:

chmod +x /path_to/post-commit
chmod +x /path_to/post-update