Skip to Content
Version Control with Git, 2nd Edition
book

Version Control with Git, 2nd Edition

by Jon Loeliger, Matthew McCullough
August 2012
Intermediate to advanced content levelIntermediate to advanced
452 pages
12h 39m
English
O'Reilly Media, Inc.
Content preview from Version Control with Git, 2nd Edition

Chapter 3. Getting Started

Git manages change. Given that intent, Git shares much with other version control systems. Many tenets—the notion of a commit, the change log, the repository—are the same, and workflow is conceptually similar among the corpus of tools. However, Git offers many novelties, too. The notions and practices of other version control systems may work differently in Git or may not apply at all. Yet no matter what your experience, this book explains how Git works and teaches mastery.

Let’s get started.

The Git Command Line

Git is simple to use. Just type git. Without any arguments, Git lists its options and the most common subcommands.

    $ git git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate|--no-pager] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS] The most commonly used git commands are: add Add file contents to the index bisect Find the change that introduced a bug by binary search branch List, create, or delete branches checkout Checkout and switch to a branch clone Clone a repository into a new directory commit Record changes to the repository diff Show changes between commits, the commit and working trees, etc fetch Download objects and refs from another repository grep Print lines matching a pattern init Create an empty git repository or reinitialize an existing one log Show commit logs merge Join two or more development histories mv Move or rename a file, a directory, or a symlink pull Fetch from and merge with another ...
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

Version Control with Git

Version Control with Git

Jon Loeliger
Version Control with Git, 3rd Edition

Version Control with Git, 3rd Edition

Prem Kumar Ponuthorai, Jon Loeliger
Git for Programmers

Git for Programmers

Jesse Liberty

Publisher Resources

ISBN: 9781449345037Errata Page