My product is large, with many active release branches. For this, I have many Eclipse workspaces, each with the source code from its release branch. I cannot use a single workspace, then "switch" release branches within it.
I would like to create a single local Git repository, which connects to a remote Git repository. Then, each of my workspaces checks out the code for its release branch, from the local repository. I would like to avoid creating a local repository for each release branch.
Is this possible? Does SourceTree support this? How? I don't see how it can be done in the SourceTree UI.
If I understand correctly you woudl like to have one local clone of the remote repository, and then have your indvidual workspaces using a single branch checked out from the local repository?
If this understanding is correct I think you might want to look at git worktree https://git-scm.com/docs/git-worktree
This can give you mulitple working copies but without duplicating the full git repo locally.
SourceTree does not explicitly support the worktree functionality, but you can open each additional worktree in SourceTree and use it as a valid repo in its own right. This saves space with respect to multiple clones of the origin repo.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs