tags:

views:

17

answers:

1

I have gitosis setup and working wonderfully using ssh. [email protected]:repository.git works just as expected. Can clone, push, pull, etc.

I was wondering if I can use git to pull a specific branching however. [email protected]:repository.git/somebranchname for example

didn't know if this was possible and haven't found any examples so I'm guessing no, but not sure.

+1  A: 

No, when you clone a Git repo, you get everything (all tags and branches). However, they'll be stored as remote branches. Assuming the name of the remote is origin (which it is by default), you can checkout a local branch using:

$ git checkout -b somebranchname origin/somebranchname

which will create a local branch called somebranchname that contains the contents of somebranchname in Gitosis' copy of the repo. It will also "track" the remote branch so git pull will continue to pull in the latest changes.

mipadi
Thanks for the reply mipadi. I found that I could do it for ruby apps with capistrano. Have been manually uploading updates to a few of my apps and that has become way to involved. for ruby capistrano will solve this problem. I've got a few c# apps that i'll have to find another solution for.
Rob Sutherland