Chapter 7. Enhancing Your Daily Work with Git Hooks, Aliases, and Scripts

In this chapter, we will cover the following topics:

  • Using a branch description in the commit message
  • Creating a dynamic commit message
  • Using external information in the commit message
  • Preventing the push of specific commits
  • Configuring and using Git aliases
  • Configuring and using Git scripts
  • Setting up and using a commit template

Introduction

In order to function in a corporate environment, there should be certain prerequisites to the code that is produced. It should be able to compile and pass specific sets of unit tests. There should also be certain documentation in the commit messages, such as references to a bug fix ID or an instance. Most of these are just scripts that are executed, ...

Get Git: Mastering Version Control now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.