Use the gitignore file on your git repository to ignore all of the Joomla core files. Only tested with Joomla 1.7