To avoid such mistakes there exist so called git hooks.
You have to implement a git hook to check commit message before the commit.
Go to .git/hooks folder in repository.
There is a file called „commit.msg.sample“ .
Remove „sample“ in the file name.
place shell script in file „commit.msg“ which checks the commit message.
gitignore is very important in many aspects, we also put in some local config files which pointed to some needed data files for the application (linux vs windows have different path seperators for example) to avoid rewriting after every pull the gitignore can be very helpful as long as you remember to forcefully commit a real change
Another tool which you could use is GitHub Desktop. The application has a better user experience and user interface over SourceTree. The layout of the GitHub Desktop application is simple and straightforward with an uncluttered interface, making it perfect for the beginner, though still including more powerful options for the advanced developer.