I've always been doing git commit . -m 'message'
Does git commit -m 'message' only affect the current folder and its sub directories or does it commit everything? And which one is more appropiate?
Adding the '.' is saying stage and commit the changes to files in the current directory that are already in the repository ignoring what has already been staged.
Without the '.' the command will commit only changes that have been staged.
I've not seen the form: git commit . -m 'message' before nor seen it recommended. Though if I'm ever in a rush to commit the changes in the current directory I might give it a go...
In my experience using git add <filenames> to stage changes works well as it allows you to clearly state exactly what you want to stage. Then git commit without the -m is handy as it shows you what you have staged and not and allows you to write the commit message in a proper editor.
The following are some really good freely available resource to learn Git. They explain really much more clearly then I probably can...
http://try.github.io - A quick very well made 15 min tutorial.
http://git-scm.com/book - Excellent clearly presented source for quickly understanding Git.
Or for online help you can always append --help to your command.
For example typing the following in you terminal:
git commit --help
git commit(a.k.a.git help commit)?git commit .used often, but rathergit commit -aif notgit commit