OK .. I am new to Git / Github after I have been at Visual Source Safe for most of my career and have seen the light β I love it. So I migrated all my .NET projects to my Github account and would also like to manage all my SQL Server databases using Git. In all my projects, I always added database files to the / Database subdirectory, so I have, for example, /Databases/MyDatabase.mdf and / Databases / MyDatabase.ldf in my source tree. I track these files using Git, and they render well on Github with all the rest of my source.
Here's what I expected: I will stop SQL Server using NET STOP MSSQLSERVER and I will branch out, so Git will pull out the MDF and LDF files for that branch. Reboot SQL Server using NET START MSSQLSERVER and do whatever work I need to do for the source and database for this particular branch. Git will track my changes in the MDF file, and when I do the / commit / push step, it will send the changes back to the remote repository.
I tried this by pulling out a database and adding a new column to the table and doing a commit. Git told me that I did not expect any changes in any elements ... I changed the MDF file. Can't Git track changes to an MDF file? My first guess was that maybe because it was binary and not the Git text base it might have problems with this, but I believe that you can use Git to track image files and other binary elements so that it doesn't look it will be a problem. Any ideas? Is it impossible? Should I even try to do this? Thanks in advance for your comments.
Craig koster
source share