The git remote sub-command has received some improvements recently:

Here’s output from a recent version of git-core:

# git remote -h
usage: git remote [-v | --verbose]
   or: git remote add [-t ] [-m ] [-f] [--mirror]  
   or: git remote rename  
   or: git remote rm 
   or: git remote set-head  [-a | -d | ]
   or: git remote show [-n] 
   or: git remote prune [-n | --dry-run] 
   or: git remote [-v | --verbose] update [-p | --prune] [group]

    -v, --verbose         be verbose
</pre>

And the latest version (or the current version available in Debian Squeeze):


# git remote -h
usage: git remote [-v | --verbose]
   or: git remote add [-t ] [-m ] [-f] [--mirror]  
   or: git remote rename  
   or: git remote rm 
   or: git remote set-head  (-a | -d | )
   or: git remote [-v | --verbose] show [-n] 
   or: git remote prune [-n | --dry-run] 
   or: git remote [-v | --verbose] update [-p | --prune] [group | remote]
   or: git remote set-url   []
   or: git remote set-url --add  
   or: git remote set-url --delete  

    -v, --verbose         be verbose; must be placed before a subcommand
</pre>

Most useful to me at the moment is the ability to change the URL for remotes, as I recently setup a gitosis server, then decided to change the hostname pointing to it. Thankfully, this makes is super easy.

sudo git remote set-url origin gitosis@git.example.com:mygitproject.git