6. Git Workflow Tools

Now that we have a bet­ter under­stand­ing of how Git works let’s look at the tools avail­able in Git for day-to-day work­flow needs. These are tools you’ve prob­a­bly used before but we’ll cov­er ways to get more out of them oth­er than the most basic usage. 

Along the way we’ll cov­er the following:

  • Logs: Learn how to cus­tomize the log out­put so it is more use­ful is view­ing work progress and iden­ti­fy­ing prob­lems. git-log right from the com­mand line can be daunt­ing, but with some smart for­mat­ting options, it’s a fast and help­ful way to under­stand what is hap­pen­ing (or what the heck hap­pened?!) in a project.
  • Stash­es: Some­times you need to quick­ly tuck away some in-progress work and do some­thing else in your branch or repos­i­to­ry. We’ll learn how exact­ly Stash works behind the scenes and then some pow­er com­mands to get the most of it.
  • Merg­ing: Unlike oth­er VCS, merg­ing in Git isn’t a scary propo­si­tion at all. We’ll look how to han­dle the most com­pli­cat­ed merg­ing prob­lems, how merges work on the inside, and how you can back out of a merge gone wrong.
  • Tag­ging: Quick­ly snap­shot the repos­i­to­ry in a spe­cif­ic state. We’ll cov­er the two dif­fer­ent types of tags, why to use tags, and how they work inter­nal­ly in Git.
  • Sub­mod­ules: Pull in an exter­nal repos­i­to­ry that is a depen­den­cy of the main project.
  • Sub­trees: Anoth­er method of pulling in an exter­nal repos­i­to­ry as a direc­to­ry in a par­ent project.
  • Hooks: Git Hooks allow you to inter­ject a script at dif­fer­ent points in the Git work­flow. These work sim­i­lar to Sub­ver­sion hooks.