Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm developing a project on my desktop and I'm in need of a version control mechanism. I'm working on ubuntu 12.04, desktop edition.

I would like to have a git server installed on localhost and also the client will be installed in the same computer.

It's easy to install the client but I can't find a full explained guide of how to install the server..

I found a guide of installing gitosis but it's no longer supported (not supported on ubuntu 12.04)

share|improve this question
1  
Why do you need a git server? –  Marco Ceppi Dec 5 '12 at 17:08
    
The git server does all the version control work.. isn't it? –  Bush Dec 5 '12 at 17:13
    
Do I need only the client? –  Bush Dec 5 '12 at 17:14
add comment

3 Answers 3

up vote 7 down vote accepted

You shouldn't need to install a Git server on your local machine to work with Git. Git is a distributed version control system (DVCS), ss such there really is no idea of a Client and Server. Instead you just have clients, as many clients as you want, which can talk to each other.

So when you type git init in a directory and create a git repository, you've got all you'll need to commit, merge, branch, and ultimately use git. For all intensive purposes, this is the master source, the "god" source, equivalent to the SVN server. Unlike in subversion, where there is a centralized source, only one true "god"/master copy, Git works in a way that everyone who clones a git repository has their own "god"/master copy. So when you share code, each person gets the theoretical equivalent of an SVN server on their machine in the form of a portable git repository. This strongly differs from the centralized model (and lends to it's distributed nature) where if your source becomes deleted it does not affect anyone else. In fact if you lose your source you can clone from someone else who has a copy of the repository and continue as if nothing happened. So long as N+1 people have a copy of the code, if all of N lose it the code will live on.

What most DVCS tools provide is a flexibility of workflow. Many people adopt a centralized workflow using services like GitHub or Bitbucket to host a remote copy of their repository. In this setup there is still fundamentally just two git repositories. One on your machine and one on the services remote servers. I strongly recommend reading the free git-scm book before getting started to familiarize yourself with what git is, how it works, and how to use it.

share|improve this answer
add comment

Git is a distributed version control system (DVCS). There is no need for a git server though one can be set up if you insist on it. Sometimes a centralized server is used (think Github) and a local server can be set up, but this is usually not the way most git users use the system. Most people do in fact use git as a distributed system with no server and no hub.

You may want to read about the philosophy behind git:

Pro Git Book

Git Documentation

Strictly speaking Hg Init is talking about Mercurial which is another DVCS system but it does provide one of the most succinct and best explained descriptions of what a DVCS is, and it is still mostly relevant to git

share|improve this answer
add comment

@Bush - sometimes people like to distribute knowledge a little too much vs just answering the question

Your reasons for setting up a GIT server can be whatever they are . services like Github & repositoryhosting.com basically provide GIT servers for you to use as remotes

so i am assuming you also want a remote setup on your own where you can push code to ?

here is a few tutorials you should use :

http://git-scm.com/book/en/Git-on-the-Server-Public-Access

you can also use something called Gitolite - another tutorial is at http://realcnbs.com/

share|improve this answer
    
I recommend gitlab.org for self hosted git server. It's fast, F/OSS, and I've never had installation issues with it. Very familiar interface, only downside is it requires ruby/passenger –  EricR Oct 14 '13 at 20:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.