sudo yum install gitBefore getting started with git, first thing is to establish some global configurations. The standard configs are saved in ~/.gitconfig (currently in config/common). There is also a ~/.gitk config file that should be modified for the mac (put in config/osx/sedona) to set the font to Monaco 12 rather than Helvetica 9.
Using Git: There are tutorials for using git on the main site and one for subversion users. After the installation, I used the tutorial to establish tracking to some basic accounting files, time sheets, check register, etc. It started like this.
cd accountingNow the accounting directory is under source control. Another great resource for git is from peepcode.
git add .
Remote Repository: The next step is to get a remote repository established. I played around with the git socket protocol on slice.host, but found it a bit too confusing. So after reviewing the peepcode git session, I decided to use ssh and a restricted shell for the remote repository. I followed these steps:
- login to the remote machine (raincity.slice.com)
- create a new 'git' user: useradd --shell /usr/bin/git-shell git
- copy to the server: scp -r accounting email@example.com:accounting
- create a /public/git folder and move the accounting to it
- set owner to git:git