Why do we use Git?

  • Git is a first-class distributed version control system, so we use it to keep a record of changes to avoid loss-of-work and to appropriately explain/document changes as projects develop.
  • Git history, which is composed of "snapshots" of the source code, can be used to go back at any point in time, which leads to reproducible science.

Git tutorials

Rewriting history

One of the most powerful things Git can do is rewrite a series of patches after the fact. This is a powerful technique worth learning. There are many guides available here and elsewhere: