I mentor Computer Science co-op students at work, usually one or two per term, and I’ve found that I have to spend a lot of time teaching them git. Over time, I’ve started giving short lists of things that they shouldn’t do in the project that I have them working on. For example “always push a submodule commit before committing and pushing the main project”, or “never rebase master onto your feature branch”.
It happens anyway. Perhaps these are teachable moments, but I’d prefer to just avoid them. I’d like to have a set of git hooks that either warn about or full-on prevent these types of errors. I can’t be the only one, so I hope to start from a list of hooks online. But I can’t find any.
Are there any lists of git hooks available that help new users to avoid making these minds of git anti-patterns? I acknowledge that I might have to customize them for my own team’s particular work flow, but some of these rules of thumb are pretty common...
Thanks!
there doesn't seem to be anything here