1

I have a web app hosted at Github and am working on three distinct branches of the codebase.

Currently I have the code checked out to a directory which maps to the IIS folder in which it is hosted on my machine. When I switch branches the project in VS reloads with that branch's codebase and the site in IIS also changes to runs off the current branch's code.

The switching of branches seems to be a machine-wide thing so it is not possible to compare the output of both branches side by side in a browser window. Back in my Subversion/TFS days I would just check out to different directories and give each one to IIS to run as a distinct site.

Is there a work-around which will allow me to do something similar using Git and VS?

immutabl
  • 6,857
  • 13
  • 45
  • 76

1 Answers1

1

You can do that under Unix (requires filesystem with symbolic links and bash scripting).

Use the git-new-workdir script (found in /usr/share/doc/git/contrib/workdir/git-new-workdir in Ubuntu Linux), can be download from https://github.com/gerrywastaken/git-new-workdir/blob/master/git-new-workdir

Usage:

git-new-workdir your-clone your-new-working-dir

your-new-working-dir contains a separate checkout and staging area, but share the history with your-clone. It is an efficient solution to work on two branches at the same time, or just inspect files in the history.

googled "git new workdir windows", looks like there are port for Windows. I've not tested those (https://groups.google.com/forum/?fromgroups=#!topic/msysgit/1z07lWg9Nts)

rcomblen
  • 4,579
  • 1
  • 27
  • 32