Currently where I work we have the following set-up (for ASP.NET web-development) using Git for version control (which we are relatively new to):
A “development” server which is a remote server running IIS that is accessible on our internal network. This is where we deploy stable development website builds so they are viewable throughout our company. On this server we create a Git repository for each project (typically a website).
Developers will then pull this repository to their local machines and work on it locally, committing any changes locally and then finally pushing those changes to the remote repository (the development server) where they are merged into the master branch.
The problem we have is that when source code is built into assemblies (DLLs) then these are added to the local Git repository, cluttering it up with binary files that shouldn’t really be there (since they can be derived from source). However, if we don’t include the DLLs (ie. put them in .gitignore) then when we push changes to the remote repository the DLLs will be missing from the /bin folder and the site won’t work. The only way around this would be to rebuild the site on the development server after pushing changes.
Is there any way around this? Ideally we need a way to ignore the DLLs from our local repository yet still “push” them to the remote server? Or somehow trigger a build on the remote server when changes are pushed?
Sounds like you need to look into “continuous integration”. You can set up your build server to run a clean build each time someone commits or you can configure for certain times in the day. You can also trigger a script to run if the build succeeds such as deploying to a test server. Plus you can get it to run unit tests and send an email to the team with any errors etc.
I don’t know how builds work in .net but my favourite CI server is jenkins.
http://jenkins-ci.org/
There are others e.g. cruise control
http://cruisecontrol.sourceforge.net/
Both are free.