This git repository stores a book which will help you learn how to use git on code as well as Simulink and other kinds of files. It is licensed under CC BY-SA 4.0, which means you can remix it however you like, so long as you provide attribution and license your work in the same way.