I've got a library project that has an associated JavaScript file, that any web sites using the library will have to include.
In the source control, the js file belongs to the library (which is right). However, when running/debugging/changing the application it is really convenient to treat the file as belonging to the web project using the library.
In TFS we handled this by remapping the scripts directory of the library onto the scripts directory of the web project, meaning that when working the project, the js file effectively looks as part of the web project, while it follows the library when branching/merging.
How do I do something similar in git?
Using a build script to copy the file is not a viable solution. It would make live changes while debugging impossible since it would only update the copy, or require a rebuild of the entire app for just a small change to force the file to be copied.
Using "add as link" is not an option either, since the web server isn't reading the project file and won't know of the link and will just return a 404 when the script is requested.
The project is developed in Visual Studio 2012, so any solution must work well together with the project structure in VS.