Viewing local html files on a local git branch

I have been using Git and TortoiseGit for a few months now and have questions on it's functionality.

Currently we use it exclusively for web development.  We push the branch to a Beansstalk repo and it deploys it to our webserver (  We also push branches (i.e. dev) to beanstalk that in turn pushes it to a subdomain for development/testing (

In order to view web pages we are working on by pushing them to the repo and deploying to our dev domain seems very inefficient.  I would like to be able to view the dev branch files on my machine through a local web server as I change them prior to making commits.  I'm sure this is simple however with Git involved I have some questions.

My Question(s):
1) If I have my files (on a local network file server) switched to a dev branch, can I run a local (client) webserver and view the dev branch files through a local (client) web browser?  I assume yes, and that when I switch back to the master branch, the files viewed in the web browser will be of the master branch.
2) Can I run a webserver on the network file server that the files reside on and view the branch, or will the server only serve the master files?  

I'm guessing it is easiest/best if I run a client webserver on the machine that is running and working on the git versioned files...

Any advice that would be different and better?

Thank you for your help!  =)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EdgeTodAuthor Commented:
To answer my own question:

Yes, you can setup a local web server on the client machine and serve the files to a browser.  The GIT branch that is active will be the files that are served.  If you switch to a different branch, those files will now be served if they are different.

A great way to preview changes before committing to a git branch and pushing to the repository.

If using XAMPP:
Make sure that the httpd.conf configuration file points to the network directory using the correct slashes (not cut and paste from Windows or a network drive):
DocumentRoot "//CASCADESVR/Website"
<Directory "//CASCADESVR/Website">
NOT Correct:
DocumentRoot "\\CASCADESVR\Website"
<Directory "\\CASCADESVR\Website">

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Version Control

From novice to tech pro — start learning today.