einpoklum
einpoklum

Reputation: 132128

Can I define an alias for a git remote?

I have a git remote named foobar:

[remote "foobar"]
        url = [email protected]:joeuser/foobar.git
        fetch = +refs/heads/*:refs/remotes/foobar/*

but I am also user to calling it foo-bar. I don't want to define foo-bar as a second remote - but I do want to used foo-bar and foobar interchangeably when referring to my single remote. Can I define foo-bar as an alias of foobar somehow?

Note: I realize that I if I add a second remote, git add remote foo-bar same_url_as_for_foobar, I would be able to use both names. The point is that I don't want to have to update/synch the branches on each copy of the remote.

Upvotes: 2

Views: 115

Answers (0)

Related Questions