This article tells you how.
Essentially, you use character sequences echoed to the screen to inform the terminal of what title it should display.
title='My first title' echo -n -e "\033]0;$title\007"
In the above example, whatever the variable title is set to while become the terminal's title. Of course, you could just have the title in the string to echo such as:
echo -n -e "\033]0;My first title\007"
But the first way makes it a slightly bit easier to use and/or extend later.
Remix of Dan MgG's answer:
echo -n -e "\033]0;$1\007"
Store it in a file called /usr/bin/title (using sudo!) and chmod it to +x. Then from anywhere you can just type
title 'Trying to Figure This GIT Thing Out'
and you get a nice little title.
(Syntax may vary if you're not on OSX, if I understand correctly)