Git is an extremely powerful and popular version control system; however, Git’s command line syntax is far from self-explanatory.
Git favors power and flexibility over usability. Its 150+ commands are a mash-up of metaphors and verbs (fetch, clone, pull, commit, rebase, stash, checkout, etc.) – you can’t apply your previous knowledge of those words to make sense of how Git works. The architecture and interface are mostly the same thing in Git, and Git’s abstraction is leaky.
But anytime a popular program is tricky to learn, it spawns a number of great blogs and cheat sheets to help people make sense of it. We’re going to share some of the best visuals for making sense of Git.
Git as a Timeline
The first visual comes from a developer named Patrick Zahnd. He refined and added to a visual called Git Data Transport commands, a diagram that portrays Git commands and how they move files left and right between the different storage and staging areas.
This diagram shows how there are five different areas where files can live while working with Git. The model here is that there are a dozen or so primary commands to move files between the five areas. These are the main things you need to know how to do with Git.
Git as Levels
Developer Matt Harrison created a diagram that explains Git in terms of levels, and flows between those levels. This visual is especially useful in showing how files are moved upstream and downstream; it also shows a very basic idea of how branching works, and which commands are used in branching.
Git Commands, Grouped According to Functionality
Jan’s and Zach’s diagrams focus on grouping commands together into 8 categories or verbs. They then explain, in more depth, how the commands actually look for most of the verbs. The model this diagram conveys is that there 8 primary actions involved in using Git; within those 8 primary actions, there are different specific Git commands for working with the files.
Git might not be the most user-friendly program, but it is extremely powerful once you know how to use it. Hopefully, some of these models and visuals will help you either learn Git or get more use out of it.
Latest posts by Kyle Pennell (see all)
- Falling Back in Love with the Front End: An Interview with Azat Mardan - May 18, 2017
- How WebRTC Has Changed Web Communication - May 11, 2017
- The Angular CLI: A Simple Way to Fire up an Angular 2 Project - April 18, 2017