Git gud#

At this point there’s still a lot to learn to use Git in a team, where it really shines. There are many resources for learning about Git in depth; I would recommend the free and popular Pro Git book. If you’re only getting started with version control there are a few things to keep in mind:

  • Almost any destructive operation can be reversed, if you’re careful. Slow down, maybe experiment in a copy of the repository, and you won’t lose changes by accident.

  • Track the source files and the instructions (or code) to transform it into other formats, but not the files generated from the sources. Tracking generated files usually leads to a messy and bloated repository history. That’s not to say you shouldn’t keep the generated files somewhere!

  • In the same vein it’s better to track the plaintext version of something than any binary representations. Some formats can be losslessly converted from a binary to a text format, for example by decompressing an SVGZ file, saving as FODT rather than ODT, or exporting a spreadsheet to CSV.

 

This page is a preview of The newline Guide to Bash Scripting

No discussions yet