# Git

Git is software that tracks and manages the history of code changes (version control). Git is the software underlying Github, which is an online platform that hosts code repositories tracked by Git. Git and Github, or similar software and hosting service, are essential to the sharing and collaborative development of code.

## Resources

Linked below are several excellent detailed descriptions and tutorials on the building blocks of Git, including workflows for practical application. Want more? A simple internet search for “Git basics” will turn up more than you care to count.

### Concepts
* [Why you need Git in academia?](https://github.com/mikecroucher/Git_Academic_Benefits)
* [Git basics](https://docs.github.com/en/get-started/using-git/about-git)
* [Git workflow models](https://www.atlassian.com/git/tutorials/comparing-workflows)
* [Pro Git Book](https://git-scm.com/book/en/v2) by Scott Chacon and Ben Straub. Comprehensive concepts, with tutorials.

### Tutorials
* [Our own GitHub Desktop GUI tutorial](../tutorials/git/index.md) - an introductory, step by step, overview of basic git functionality using GitHub Desktop (applicable to any GUI git application)
* [Git tutorial for novices](https://swcarpentry.github.io/git-novice/) from Software Carpentry
    * Also see the main [Lessons page](https://software-carpentry.org/lessons/) at Software Carpentry for many other tutorials
* [Happy Git and GitHub for the useR](https://happygitwithr.com/) from Jenny Bryan (for use with RStudio)

### Gitignore
* [Gitignore generator](https://gitignore.io) - a website to generate .gitignore files for your project from templates based on language, OS, project framework, etc. If you provide multiple templates, it will generate a single .gitignore file that combines them.
* [A brief explanation of .gitignore](https://carpentries-incubator.github.io/git-Rstudio-course/02-ignore/index.html) for RStudio
* [Python gitignore](https://github.com/github/gitignore/blob/main/Python.gitignore) - a sample .gitignore file for Python projects

### Advanced topics
* [Pre-commit](https://pre-commit.com): git commit hook manager
* [Git Large File Storage](https://git-lfs.com/)
* [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
