Git internals

Páginas: 87 (21674 palabras) Publicado: 1 de septiembre de 2010
Git Internals
Source code control and beyond by Scott Chacon

Git Internals ©2008 Scott Chacon Every effort was made to provide accurate information in this document. However, neither Scott Chacon nor Topfunky Corporation shall have any liability for any errors in the code or descriptions presented in this book. This document is available for US$9 at PeepCode.com (http://peepcode.com). Groupdiscounts and site licenses can also be purchased by sending email to peepcode@topfunky.com.

other peepcode products
• RSpec (http://peepcode.com/products/rspec-basics) – A three part series on the popular behavior-driven development framework. • Rails from Scratch (http://peepcode.com) – Learn Rails! • RESTful Rails (http://peepcode.com/products/restful-rails) – Teaches the concepts ofapplication design with REST. • Subscription pack of 10 (http://peepcode.com/products/subscriptionpack-of-10) – Save money! Buy 10 PeepCode credits. • Javascript with Prototype (http://peepcode.com/products/javascriptwith-prototypejs) – Code confidently with Javascript! • Rails Code Review PDF (http://peepcode.com/products/draft-railscode-review-pdf) – Common mistakes in Rails applications, and how tofix them.

2

contents 4 5 5 6 7 8 10 11 About this book

54

Using Git

111

Commands Overview

54 Setting Up Your Profile 55 Getting a Git Repository 57 Normal Workflow Examples 63 Log – the Commit History 65 Browsing Git 71 Searching Git 72 Git Diff 75 Branching 77 Simple Merging 80 Rebasing 86 Stashing 89 Tagging 91 Exporting Git 92 The Care and Feeding of Git 94 DistributedWorkflow Examples 105 Sharing Repositories 107 Hosted Repositories

111 Basic Git 115 Inspecting Repositories 117 Extra Tools 119

Installing Git
Installing on Linux Installing on Mac Windows A Short History of Git

References and Endnotes

119 Web Documentation 120 Screencasts

Understanding Git
10 What is Git? Focus and Design 13 Git Object Types 22 The Git Data Model 28 Branching andMerging 41 The Treeish 44 The Git Directory 48 Working Directory 49 The Index 49 Non-SCM Uses of Git

About this book
It took me a pretty long time to really get Git. As I’ve continued to use Git more and more where I work, I’ve found myself trying to teach people what it is and why we use it over and over again, and the reality is that Git generally has a pretty steep learning curve compared tomany other systems. I’ve seen case after case of developers who love Git after they finally understand it, but getting to that point is often somewhat painstaking. This book is aimed at the developer who does not particularly like Subversion, Perforce or whatever SCM system they are currently using, has heard good things about Git, but doesn’t know where to start or why it’s so wonderful. It ismeant to explain Git as simply as possible in a clean, concise, easily readable volume. My goal is to help you understand Git internals as well as usage at a fundamental level by the time you finish this book. To accomplish this, I’m starting the book out (after the introduction) with a section about what Git actually does, rather than how to use it. I found that I didn’t really understand Git andhad many problems using it until I understood what it was actually doing at a low level, rather than thinking of it as a different, weird SVN-like system.

4

Installing Git
chapter 1
Before we can start playing with Git, we’ll have to install it. I’ll quickly cover installing Git on Linux, Mac and Windows. I will not get into really fine detail, because others have done that much better,but I will give you an overview and links as to where to find more detailed instructions on each platform. For any of these examples, you can find a link to the most current Git source code at git.or.cz (http://git.or.cz). I would recommend compiling from source if possible, simply because Git is lately making big strides in usability, so more current versions may be a bit easier to use....
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • GIT
  • GIT
  • Gita
  • Bhagavad Gita
  • el bagadav-gita
  • bhagavad gita
  • Bhagavad gita
  • Resumen de Git

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS