One of the most useful features of any version control system is the ability to “undo” your mistakes. In Git, “undo” can mean many slightly different things. Useful Undo. Source: How to undo (almost) anything with Git
Matthew Setter take a look at Static Review – a framework for writing git hooks, so you can do hook inspections on your files on certain git actions! Seems nice. Although not keen to try it right now. Source: Writing PHP Git Hooks with Static Review
There are two ways. But probably preferable Command Line one. Since the Web UI one is said not really the right way to sync.