28
Jan
Link

Why you should switch from svn to git

Great article on why git is an easier and better version control system than subversion. A lot of very good points. Having recently moved to git myself, I now find myself just playing with it for no good reason just because it’s enjoyable. I also find myself evangelizing it at work and online.

22
Jan
Aside

How to configure a git server on Ubuntu 10.10

A friend of mine asked me for some help installing git sever on ubuntu. I wanted to do this myself at home, so I took the opportunity to do it and use that as a document for him. There are a number of good sources online with regard to this type of installation but I found that I needed to piece it together from several of them to get a working system. I chose gitolite for the multiuser component as it seems to be the one most folks recommend.

Server install
To begin with, we had n ubuntu 10.10 system installed and online. You will need to get the necessary git server software installed to begin. This can be done using apt-get:

server

sudo apt-get install git-core
sudo apt-get install gitolite
sudo apt-get install git-daemon-run

At this point your server software is installed, and will start up following a reboot.

Add a user

On the client computer you will need to set up ssh key authentication. To generate an ssh key, follow the example below, entering your own password that you want to use to access your git repository.

client

ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/gituser/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/gituser/.ssh/id_rsa.
Your public key has been saved in /home/gituser/.ssh/id_rsa.pub.
The key fingerprint is:
61:bf:f5:2d:f6:ed:cd:10:b7:0c:be:5d:4d:8f:a3:0d gituser@client

Once this key is generated you will need to transfer the public version of the key to your git server. You can do this using scp:

client

scp /home/gituser/.ssh/id_rsa.pub user@gitserver:/tmp/gituser.pub

Now you need to go back to the gitserver and add this key to git:

server

chmod 666 /tmp/gituser.pub
su gitolite
gl-setup /tmp/gituser.pub

Now you have added a user to the git server.

Client configuration

There is very little to do to allow your client to connect to the git server now, and really I only set up the following for myself:

client

git config --global user.name "firstname lastname"
git config --global user.email email@email.com

Adding a repository to your new git server

Finally, lets set up a test repository. To do this we need to first check out the gitolite-admin repository from the git server and edit the configuration file and then check it back in.

client

git clone gitolite@server:gitolite-admin
cd gitolite-admin/
vi conf/gitolite.conf

This file should already contain a couple of repositories:

client

        repo    gitolite-admin
                RW+     =   gituser
 
        repo    testing
                RW+     =   @all

You can create a new repository by adding a couple of lines to the bottom of that file:

client

       repo    mytest
                RW+ = gituser

Save that file, and we can then commit it back to the server:

client

git commit -m "Added mytest repo" conf/gitolite.conf
git push

You should see output like the following, this creates the repository on the git server:

client

Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 398 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
Already on 'master'
creating mytest...
Initialized empty Git repository in /var/lib/gitolite/repositories/mytest.git/
To gitolite@gitserver:gitolite-admin
   610d463..98a9226  master -> master

Now that we have a new repository, we can clone it to our local client system and add files to it:

client

cd
git clone gitolite@gitserver:mytest
cd mytest
echo “This is a test> readme.txt
git add .
git commit -m "Initial checkin of readme.txt"
git push origin master

Now you can delete that entire directory and clone it back from the server again and you will find your readme.txt file again. Very cool!

External links

These 2 sites are a great resource to understanding git and how to do different tasks.

http://www-cs-students.stanford.edu/~blynn/gitmagic/

http://help.github.com/git-cheat-sheets/

I’d also recommend you get a hold of the Pro Git book:

http://progit.org/

Well, happy coding now!

29
Oct
Link

New Color Nook

I can’t believe they are finally getting a clue.  I hope it works out for them, but I honestly don’t see the advantage of an e-reader that can only read books from one store.  The iPad is much more versatile as an e-reader since there is a Nook app and a Kindle app in addition to the iTunes book store.  Just seems like a waste of money to buy something that only has a handful of things it can do.

27
Oct
Aside

Apple’s new In Store App

Today I had need of help in an Apple Store, so I went to the closest store in my area, the Northpoint Mall location.  My previous experience with this particular store has not been favorable.  Typically they will lose any reservation I have set, they have caused me to wait for at least an hour on more than one occasion, and they do not offer anything but a quick side apology.

Today I decided to try my luck with using the new features of the iPhone application.  What I experienced was less than great customer service once again from this store.  I checked in at 12:12 for a 12:15 appointment.  The app told me to go to the genius bar and that someone was already waiting for me.  There was no one at the bar waiting for me.  I stood there until 12:40 before anyone asked me if I had been helped yet.  I watched number of people came into the store and were immediately helped.  At least 6 sales reps passed by me without saying a word, some of them stopping to ask someone in front of me if they had been helped.  One even told me he liked my hat as he walked by.
So when I finally approached someone to get some help, they started looking for my reservation.  Somehow, they lost it even though I had a receipt in email from them.  So they set me up with a new appointment for 12:45 and someone was supposed to help me right away.  I waited until 1 and gave up and left.  If you ever need Apple Store help, stay away from the North Point Mall location.  This has been my experience over and over again.  When I ordered an iPad it took almost 2 months to arrive even though I ordered it the day it came out.  I found out later they had lost my order somehow.  Avoid like the plague.