Let's say I'm using git locally only, for web work in JavaScript. I've got git set up in just the base folder of the entire site, and I work on several features within that site (a rotating carousel, Ajax page loader, popup menus, etc). I obviously can't set things up into individual folders due to the structure (various scripts are in js/, images are in img/). What would be a good, clean way to work with git rather than just working on different features in one single repository? I was thinking maybe create branches called carousel, popup-menu, ajax-loader, etc., and just work on those specific features there, and merge them into the master. Does that make the most sense in this scenario, where you don't have compartmentalized projects as you would for, say, a C++ application or Xcode project?
Additional question: does it make sense to put any unrelated files in .gitignore as well, then just list the files I'm working on as exceptions? e.g.:
*.html *.php *.jpg *.js *.css !my-script.js !another-file.css