GIT Versioning System Just Blew My Mind
I have a source repository on a server and clone the project to my local machine to work on it. I also clone the project on that same server to a web-accessible directory so when I'm done with changes all I have to do is git pull in the web directory and it updates itself to the most recent version.
I was working on a project that needed some files and folders rearranged. It started out something like this:
/*.fla /*.as /www/*.php /www/includes/config.php
I wanted to turn it into:
/*.php /includes/config.php /flashsource/*.fla /flashsource/*.as
Thus, moving all the stuff from the /www/ directory to the root of the project. So I made the changes on the server in the web directory and did a commit and a push to the repository.
Whoops! I forgot that I needed to update that very same config file with some different information in order for it to work on the server (local vs. remote database authentication mumbo-jumbo). So on my local machine (which still had the old folder structure), I made the change and committed it to my local clone.
Anyone who has worked with version control systems knows what most of them (namely SVN) would do if I tried to push the changes to the server - vomit error messages all over my screen. Fingers crossed, I did a git pull to get the most recent version and then a git push to (hopefully) put the changes to the config file.
Holy crap it worked! The pull rearranged my folder structure locally, keeping the change I had previously committed to the config.php file but was smart enough to move the modified and committed config file to the new home I had given it on the server.
A git pull in the web directory to get the changes config file and we were in business.
SVN probably would have exploded in this situation.



