6. Git Workflow Tools
Now that we have a better understanding of how Git works let’s look at the tools available in Git for day-to-day workflow needs. These are tools you’ve probably used before but we’ll cover ways to get more out of them other than the most basic usage.
Along the way we’ll cover the following:
- Logs: Learn how to customize the log output so it is more useful is viewing work progress and identifying problems. git-log right from the command line can be daunting, but with some smart formatting options, it’s a fast and helpful way to understand what is happening (or what the heck happened?!) in a project.
- Stashes: Sometimes you need to quickly tuck away some in-progress work and do something else in your branch or repository. We’ll learn how exactly Stash works behind the scenes and then some power commands to get the most of it.
- Merging: Unlike other VCS, merging in Git isn’t a scary proposition at all. We’ll look how to handle the most complicated merging problems, how merges work on the inside, and how you can back out of a merge gone wrong.
- Tagging: Quickly snapshot the repository in a specific state. We’ll cover the two different types of tags, why to use tags, and how they work internally in Git.
- Submodules: Pull in an external repository that is a dependency of the main project.
- Subtrees: Another method of pulling in an external repository as a directory in a parent project.
- Hooks: Git Hooks allow you to interject a script at different points in the Git workflow. These work similar to Subversion hooks.