Considering the way Eclipse work, it has only one version of a project available in an Eclipse workspace at any time (because the id of a project is its... name)
When one needs to "switch branch", I always prefer having:!
- multiple clones of the repo (one per branch, I rarely need more than 2)
- multiple Eclipse workspaces
Switching branch means switching workspace and updating the branch you are in, in that workspace.
As the OP user2736833 comments below (using git remote
):
git clone repo br_dir
cd br_dir
git checkout br
cd repo
git remote add -t br_dir br_repo ../br_dir
Then:
git fetch br_repo
git checkout br
git merge br_repo/br