Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Conceptual Overview

Git was originally created in 2005 by Linus Torvalds as a system for managing changes to the Linux kernel. Although it is used for many of the same tasks as other version control systems like Subversion, Git’s internal workings are very different. It’s important to understand some of these concepts in order to use Git successfully.

Git maintains a repository; a directory structure that tracks the historical contents of a set of files. Generally, the repository is stored in a .git directory (or another directory named by $GIT_DIR) along with the files themselves.

Unlike other version control systems, Git does not enforce the concept of a “central repository.” Instead, every set of files tracked by Git has its own .git repository, and revisions can be easily pushed and pulled from one repository to another.

The set of files currently being tracked by Git is called the working tree. The working tree is where most of your daily work takes place. By default, the working tree starts in the parent directory of the .git directory. (You can override this by setting $GIT_WORK_TREE.) The operation of creating a working tree from a repository is called checking out the files, which is done by git checkout. After modifying the files in the working tree, you save the changes back to the repository by committing them with git commit (this is also called checking in).

Unlike other systems, Git introduces an extra, intermediate state between the repository and the working tree called ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page