Absolute must-do for any new git users out there: set your name and email, so people can know who did what in the code!
git config --global user.name "John Doe"
git config --global user.email "john.doe@company.com"
Also, if you’re a command-line user (and who isn’t?!), make sure you configure it to add a splash of colour to its output. It’s really useful.
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
Oh, and in case you’re pair programming, this little script goes a long way:
#!/usr/bin/env ruby
def usage
puts "./pair [name] [name]: pair two people"
exit
end
usage if ARGV.size != 2
pair = [ARGV[0], ARGV[1]]
puts "pairing #{pair.first} and #{pair.last}"
`git config user.name "#{pair.first} & #{pair.last}"`
`git config user.email #{pair.first}+#{pair.last}@company.com`
And that’s it

The Punch Barrel / Git tip: set your identification and colours | 27-Jun-08 at 12:54 pm | Permalink
[...] lixo.org :: Git tip: set your identification and colours [...]
Chris | 05-Jul-08 at 2:15 pm | Permalink
lol - ruby junkies
#/bin/sh
set -e
if [ $# != 2 ]; then
echo “usage: $0 name name” 2>&1
echo ” pair two users in git config” 2>&1
exit 1
fi
echo “pairing $1 $2″
git config user.name “$1 & $2″
git config user.email “$1+$2@company.com”