Enforce Coding Standards with PHP_CodeSniffer and Eclipse IDE on Ubuntu Linux
A Simple ISAPI Filter for Authentication on IIS
Development Resource Project
Using PHP pspell Spell Check Functions with a Custom Dictionary
ENUMs, User Preferences, and the MySQL SET Datatype
Getting Set up with Ogre 3D on Ubuntu

Setting up a Git Repository on CentOS 5

Friday, 29 July 11, 10:16 am
If you are setting up version control, and have access to a managed server, you may decide to create your central repositories on that server, so that all developers can access the repo from wherever they are: in the office, at home, on the beach etc etc

Many managed servers use CentOS, the commercial version of RedHat Linux. If you can find a source repo with git in it, you can install using yum:
yum install git
However, you're quite likely to come up against dependency errors, because some dependencies for git are not in the source repo:
Error: Missing Dependency: perl(Error) is needed by package git- (epel) Error: Missing Dependency: perl-Git = is needed by package git- (epel) Error: Missing Dependency: perl(Git) is needed by package git- (epel)
One solution is to install each package individually as an RPM. Use rpmfind.net to find the packages you need. You will need to install the same version of git as of perl-Git.

For CentOS, I got the latest git and perl-Git versions listed for the "Extras Packages for Enterprise Linux 5 for x86_64" distro with EL5 (I knew I had EL5 as it appeared as part of yum's output when I did a yum update). For perl(Error), I grabbed the latest version showing for "DAG packages for Red Hat Linux el5 x86_64".

Once I'd downloaded these three RPMs with wget, I installed them with the following:
rpm -i git- perl-Git- perl-Error-0.17016-1.el5.rf.noarch.rpm
Now that git's installed, you can set up the repository. Go to the folder where the source files are (or will be), and enter:
git init
It'll say that it's initialised an empty repository at .git, even if you have source files in there. This is because you need to add those files and then commit them:
git add . git commit -m "initial import"
The following command will confirm that all has gone to plan:
git status
Hopefully this will tell you "nothing to commit (working directory clean)". Your git repository is now ready to be cloned by any devs who need to work on that code.


1:12 pm, Monday, 29 October 12

thanks it was really helpful :)
Leave Comment

/xkcd/ Wifi vs Cellular

About This Page