Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Git questions
PostPosted: Wed Jan 02, 2013 7:02 pm 
Offline
Junior Member

Joined: Sat Nov 10, 2012 10:24 pm
Posts: 22
I would like to set up a repo on my server using Git, but being new to it not quite sure how to go about it.

Do I need a github account? I have 1 but i need a private repo ann not quite sure why I have to pay if im hosting the files on my server. Rather confusing.
I want to host the files / branches on my server so why the need for a hub account?

I am using Aptana Studio 3 as my working environment. I have git installed on the server (Ubuntu 10.04 / nGinx) Google'd config / setup but to no avail as to actually create a repo for the project. Just basic install process which is where I sit so hoping maybe some answers here might point me in the right direction.

Thanks,
Dave


Top
   
 Post subject: Re: Git questions
PostPosted: Wed Jan 02, 2013 7:43 pm 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
This tutorial might help you get started:
http://allanfeid.com/content/setting-yo ... repository

Here's an alternate tutorial that also might be helpful:
http://tumblr.intranation.com/post/7662 ... rver-linux

And no, you don't need to have a github account, since you're not using their repository servers.


Top
   
 Post subject: Re: Git questions
PostPosted: Wed Jan 02, 2013 8:51 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
For what it's worth, I've found gitolite to be a really good git server. It may be overkill for one person, but even for my personal stuff, I find it's nicer than the alternative.

What's the alternative?

Code:
mkdir ~/git
cd ~/git
git init --bare your-repository-here.git


Then, you can clone that (bare and initially empty) repository from anywhere else:

Code:
git clone your-username@your-server-hostname:git/your-repository-here.git


Keep in mind that every clone of the repository is an independent and fully-functional repository, which means the concept of "server" is somewhat arbitrary. This is much different than how SVN does things, for example. You can use git just fine without a server.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject: Re: Git questions
PostPosted: Wed Jan 02, 2013 10:43 pm 
Offline
Junior Member

Joined: Sat Nov 10, 2012 10:24 pm
Posts: 22
Thanks for the info guys,
Will give it an attempt and see how it goes.

Last question is where should the git repo be created on the server?
As of now its just me but would like to set it up correct so I do not have to do it again.


Top
   
 Post subject: Re: Git questions
PostPosted: Thu Jan 03, 2013 7:29 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
If you're using something like gitolite, you'll create a new 'git' user and gitolite will create the repositories there. Doesn't really matter too much where they end up, but if no other action is taken, they'll be under /home/git.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group