Bryan O'Malley
“…and if I claim to be a wise man, it surely means that I don't know.”

How To Name Your Git Remotes

Here's a quick tip for how to give your Git remotes a more meaningful name.

Personally, I don't like how every remote defaults to origin.  What does that mean?  Did this code from from Beanstalk?  GitHub?  GitStack?  Who knows?

We can do better.

To assign a meaningful name to the remote when you clone a repository, simply use the -o parameter, followed by the name you wish to use.  For example:

git clone -o beanstalk


git clone -o github

To use these fancy new remotes, you can say…

git push beanstalk master


git push github mybranch

Easy as pie.  Mmmmm… pie…

Previous Post Next Post