I've been trying to find a way to use git with Wordpress in a way that I can have a local directory and sync it to Github without disorganizing XAMPP's file structure. I had the idea of initializing the repo in the theme folder but then I realized that a lot of plugin's keep pertinent data in directories outside the theme folder. For instance if I initialized the theme in the "theme_name" folder it wouldn't carry over data about Advanced Custom Fields which is a plugin I use a lot.
Another idea I had was to initialize the repo from htdocs and use an ignore file to specify which files/directories not to include but I'm not sure which files/directories to exclude. If anyone has an easy way of syncing a Wordpress theme folder with its plugin data to git, it would be really helpful.