It Seemed Like a Good Idea at the Time Coding, Mostly

20Jul/090

Git Short URLs

I knew for a fact this feature existed, but even so it took me a half hour to track down the syntax for it. To prevent myself ever needing to do that again, I'm putting it here.

To create a nice, short URL abbreviation for git, such as myserver:<project>.git, put the following in ~/.gitconfig

[url "ssh://MY-SERVER/~/"]
    insteadOf = myserver:

That's all there is to it.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Filed under: Note To Self No Comments