The git Command

Everything you do with Git is accomplished using the git command. The git main program doesn’t actually do anything itself; instead, it runs subcommands based on the first word on the command line, often executing a subprogram based on that name. For example, if you run git add, Git might end up executing a program called git-add. In fact, if you create additional git-* commands in your $PATH, Git will add them to its repertoire automatically.

Git contains a daunting number of subcommands—well over 100 of them. Most of these commands are meant to be used internally to create other subcommands. We’ll cover only the most important commands in this book.

Get Linux in a Nutshell, 6th Edition 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.