1

Possible Duplicate:
Is it possible to alias a branch in Git?

We have a public and an internal version for our code. Right now we have 2 branches and we have to manually commit change to each to keep them in sync. Is there a way to create an alias or something that will let devs with in a single branch with 2 different names?

The idea is one group of devs only knows and works with public version so they would do a git checkout pub-1.0.0 and another department worth of devs only knows internal versions so they would do a git checkout dev-1.2.3.

Both groups devs should be working with the same code. a commit to pub-1.0.0 should be seen in dev-1.2.3 and visa verse.

Is this setup possible?

Community
  • 1
  • 1
Justin808
  • 20,019
  • 44
  • 152
  • 253

1 Answers1

1

From Is it possible to alias a branch in Git? :

you can create a symbolic reference to the master branch:

git symbolic-ref refs/heads/trunk refs/heads/master

Note that trunk isn't a first class citizen. If you checkout trunk and perform a git status you will actually be on master, however you can use the trunk command in all places that you use the branch name (log, merge, etc.).

Community
  • 1
  • 1
George Skoptsov
  • 3,721
  • 1
  • 25
  • 44