CINXE.COM

Git Magic - Preface

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git Magic - Preface</title><link rel="stylesheet" type="text/css" href="default.css"><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Git Magic"><link rel="up" href="index.html" title="Git Magic"><link rel="prev" href="index.html" title="Git Magic"><link rel="next" href="ch01.html" title="Chapter 1. Introduction"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <div class="toc"><ul class="toc"><li><b>Git Magic</b></li><li><span class="preface"><a href="pr01.html">Preface</a></span><ul><li><span class="section"><a href="pr01.html#_thanks">Thanks!</a></span></li><li><span class="section"><a href="pr01.html#_license">License</a></span></li></ul></li><li><span class="chapter"><a href="ch01.html">1. Introduction</a></span><ul><li><span class="section"><a href="ch01.html#_work_is_play">Work is Play</a></span></li><li><span class="section"><a href="ch01.html#_version_control">Version Control</a></span></li><li><span class="section"><a href="ch01.html#_distributed_control">Distributed Control</a></span></li><li><span class="section"><a href="ch01.html#_a_silly_superstition">A Silly Superstition</a></span></li><li><span class="section"><a href="ch01.html#_merge_conflicts">Merge Conflicts</a></span></li></ul></li><li><span class="chapter"><a href="ch02.html">2. Basic Tricks</a></span><ul><li><span class="section"><a href="ch02.html#_saving_state">Saving State</a></span></li><li><span class="section"><a href="ch02.html#_add_delete_rename">Add, Delete, Rename</a></span></li><li><span class="section"><a href="ch02.html#_advanced_undo_redo">Advanced Undo/Redo</a></span></li><li><span class="section"><a href="ch02.html#_reverting">Reverting</a></span></li><li><span class="section"><a href="ch02.html#_changelog_generation">Changelog Generation</a></span></li><li><span class="section"><a href="ch02.html#_downloading_files">Downloading Files</a></span></li><li><span class="section"><a href="ch02.html#_the_bleeding_edge">The Bleeding Edge</a></span></li><li><span class="section"><a href="ch02.html#_instant_publishing">Instant Publishing</a></span></li><li><span class="section"><a href="ch02.html#_what_have_i_done">What Have I Done?</a></span></li><li><span class="section"><a href="ch02.html#_exercise">Exercise</a></span></li></ul></li><li><span class="chapter"><a href="ch03.html">3. Cloning Around</a></span><ul><li><span class="section"><a href="ch03.html#_sync_computers">Sync Computers</a></span></li><li><span class="section"><a href="ch03.html#_classic_source_control">Classic Source Control</a></span></li><li><span class="section"><a href="ch03.html#_secret_source">Secret Source</a></span></li><li><span class="section"><a href="ch03.html#_bare_repositories">Bare repositories</a></span></li><li><span class="section"><a href="ch03.html#_push_versus_pull">Push versus pull</a></span></li><li><span class="section"><a href="ch03.html#_forking_a_project">Forking a Project</a></span></li><li><span class="section"><a href="ch03.html#_ultimate_backups">Ultimate Backups</a></span></li><li><span class="section"><a href="ch03.html#_light_speed_multitask">Light-Speed Multitask</a></span></li><li><span class="section"><a href="ch03.html#_guerilla_version_control">Guerilla Version Control</a></span></li><li><span class="section"><a href="ch03.html#_mercurial">Mercurial</a></span></li><li><span class="section"><a href="ch03.html#_bazaar">Bazaar</a></span></li><li><span class="section"><a href="ch03.html#_why_i_use_git">Why I use Git</a></span></li></ul></li><li><span class="chapter"><a href="ch04.html">4. Branch Wizardry</a></span><ul><li><span class="section"><a href="ch04.html#_the_boss_key">The Boss Key</a></span></li><li><span class="section"><a href="ch04.html#_dirty_work">Dirty Work</a></span></li><li><span class="section"><a href="ch04.html#_quick_fixes">Quick Fixes</a></span></li><li><span class="section"><a href="ch04.html#_merging">Merging</a></span></li><li><span class="section"><a href="ch04.html#_uninterrupted_workflow">Uninterrupted Workflow</a></span></li><li><span class="section"><a href="ch04.html#_reorganizing_a_medley">Reorganizing a Medley</a></span></li><li><span class="section"><a href="ch04.html#_managing_branches">Managing Branches</a></span></li><li><span class="section"><a href="ch04.html#_temporary_branches">Temporary Branches</a></span></li><li><span class="section"><a href="ch04.html#_work_how_you_want">Work How You Want</a></span></li></ul></li><li><span class="chapter"><a href="ch05.html">5. Lessons of History</a></span><ul><li><span class="section"><a href="ch05.html#_i_stand_corrected">I Stand Corrected</a></span></li><li><span class="section"><a href="ch05.html#_8230_and_then_some">… And Then Some</a></span></li><li><span class="section"><a href="ch05.html#_local_changes_last">Local Changes Last</a></span></li><li><span class="section"><a href="ch05.html#_rewriting_history">Rewriting History</a></span></li><li><span class="section"><a href="ch05.html#_making_history">Making History</a></span></li><li><span class="section"><a href="ch05.html#_where_did_it_all_go_wrong">Where Did It All Go Wrong?</a></span></li><li><span class="section"><a href="ch05.html#_who_made_it_all_go_wrong">Who Made It All Go Wrong?</a></span></li><li><span class="section"><a href="ch05.html#_personal_experience">Personal Experience</a></span></li></ul></li><li><span class="chapter"><a href="ch06.html">6. Multiplayer Git</a></span><ul><li><span class="section"><a href="ch06.html#_who_am_i">Who Am I?</a></span></li><li><span class="section"><a href="ch06.html#_git_over_ssh_http">Git Over SSH, HTTP</a></span></li><li><span class="section"><a href="ch06.html#_git_over_anything">Git Over Anything</a></span></li><li><span class="section"><a href="ch06.html#_patches_the_global_currency">Patches: The Global Currency</a></span></li><li><span class="section"><a href="ch06.html#_sorry_we_8217_ve_moved">Sorry, We’ve Moved</a></span></li><li><span class="section"><a href="ch06.html#_remote_branches">Remote Branches</a></span></li><li><span class="section"><a href="ch06.html#_multiple_remotes">Multiple Remotes</a></span></li><li><span class="section"><a href="ch06.html#_my_preferences">My Preferences</a></span></li></ul></li><li><span class="chapter"><a href="ch07.html">7. Git Grandmastery</a></span><ul><li><span class="section"><a href="ch07.html#_source_releases">Source Releases</a></span></li><li><span class="section"><a href="ch07.html#_commit_what_changed">Commit What Changed</a></span></li><li><span class="section"><a href="ch07.html#_my_commit_is_too_big">My Commit Is Too Big!</a></span></li><li><span class="section"><a href="ch07.html#_the_index_git_8217_s_staging_area">The Index: Git’s Staging Area</a></span></li><li><span class="section"><a href="ch07.html#_don_8217_t_lose_your_head">Don’t Lose Your HEAD</a></span></li><li><span class="section"><a href="ch07.html#_head_hunting">HEAD-hunting</a></span></li><li><span class="section"><a href="ch07.html#_building_on_git">Building On Git</a></span></li><li><span class="section"><a href="ch07.html#_daring_stunts">Daring Stunts</a></span></li><li><span class="section"><a href="ch07.html#_preventing_bad_commits">Preventing Bad Commits</a></span></li></ul></li><li><span class="chapter"><a href="ch08.html">8. Secrets Revealed</a></span><ul><li><span class="section"><a href="ch08.html#_invisibility">Invisibility</a></span></li><li><span class="section"><a href="ch08.html#_integrity">Integrity</a></span></li><li><span class="section"><a href="ch08.html#_intelligence">Intelligence</a></span></li><li><span class="section"><a href="ch08.html#_indexing">Indexing</a></span></li><li><span class="section"><a href="ch08.html#_git_8217_s_origins">Git’s Origins</a></span></li><li><span class="section"><a href="ch08.html#_the_object_database">The Object Database</a></span></li><li><span class="section"><a href="ch08.html#_blobs">Blobs</a></span></li><li><span class="section"><a href="ch08.html#_trees">Trees</a></span></li><li><span class="section"><a href="ch08.html#_commits">Commits</a></span></li><li><span class="section"><a href="ch08.html#_indistinguishable_from_magic">Indistinguishable From Magic</a></span></li></ul></li><li><span class="appendix"><a href="apa.html">A. Git Shortcomings</a></span><ul><li><span class="section"><a href="apa.html#_sha1_weaknesses">SHA1 Weaknesses</a></span></li><li><span class="section"><a href="apa.html#_microsoft_windows">Microsoft Windows</a></span></li><li><span class="section"><a href="apa.html#_unrelated_files">Unrelated Files</a></span></li><li><span class="section"><a href="apa.html#_who_8217_s_editing_what">Who’s Editing What?</a></span></li><li><span class="section"><a href="apa.html#_file_history">File History</a></span></li><li><span class="section"><a href="apa.html#_initial_clone">Initial Clone</a></span></li><li><span class="section"><a href="apa.html#_volatile_projects">Volatile Projects</a></span></li><li><span class="section"><a href="apa.html#_global_counter">Global Counter</a></span></li><li><span class="section"><a href="apa.html#_empty_subdirectories">Empty Subdirectories</a></span></li><li><span class="section"><a href="apa.html#_initial_commit">Initial Commit</a></span></li><li><span class="section"><a href="apa.html#_interface_quirks">Interface Quirks</a></span></li></ul></li><li><span class="appendix"><a href="apb.html">B. Translating This Guide</a></span></li></ul></div> <div class="content"> <div class="preface"><div class="titlepage"><div><div><h1 class="title"><a name="_preface"></a>Preface</h1></div></div></div><p><a class="ulink" href="http://git-scm.com/" target="_top">Git</a> is a version control Swiss army knife. A reliable versatile multipurpose revision control tool whose extraordinary flexibility makes it tricky to learn, let alone master.</p><p>As Arthur C. Clarke observed, any sufficiently advanced technology is indistinguishable from magic. This is a great way to approach Git: newbies can ignore its inner workings and view Git as a gizmo that can amaze friends and infuriate enemies with its wondrous abilities.</p><p>Rather than go into details, we provide rough instructions for particular effects. After repeated use, gradually you will understand how each trick works, and how to tailor the recipes for your needs.</p><div class="itemizedlist"><p class="title"><b>Translations</b></p><ul class="itemizedlist" type="disc"><li class="listitem"> <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css"> <a class="ulink" href="/~blynn/gitmagic/intl/zh_cn/" target="_top">Simplified Chinese</a>: by JunJie, Meng and JiangWei. Converted to <a class="ulink" href="/~blynn/gitmagic/intl/zh_tw/" target="_top">Traditional Chinese</a> via <code class="literal">cconv -f UTF8-CN -t UTF8-TW</code>. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/fr/" target="_top">French</a>: by Alexandre Garel, Paul Gaborit, and Nicolas Deram. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/de/" target="_top">German</a>: by Benjamin Bellee and Armin Stebich; also <a class="ulink" href="http://gitmagic.lordofbikes.de/" target="_top">hosted on Armin’s website</a>. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/it/" target="_top">Italian</a>: by Mattia Rigotti. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/ko/" target="_top">Korean</a>: by Jung-Ho (John) Han; also <a class="ulink" href="https://sites.google.com/site/drinkhanjohn/useful-links/" target="_top">hosted on John’s website</a>. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/pl/" target="_top">Polish</a>: by Damian Michna. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/pt_br/" target="_top">Brazilian Portuguese</a>: by José Inácio Serafini and Leonardo Siqueira Rodrigues. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/ru/" target="_top">Russian</a>: by Tikhon Tarnavsky, Mikhail Dymskov, and others. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/es/" target="_top">Spanish</a>: by Rodrigo Toledo and Ariset Llerena Tapia. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/uk/" target="_top">Ukrainian</a>: by Volodymyr Bodenchuk. </li><li class="listitem"> <a class="ulink" href="/~blynn/gitmagic/intl/vi/" target="_top">Vietnamese</a>: by Trần Ngọc Quân; also <a class="ulink" href="http://vnwildman.users.sourceforge.net/gitmagic/" target="_top">hosted on his website</a>. </li></ul></div><div class="itemizedlist"><p class="title"><b>Other Editions</b></p><ul class="itemizedlist" type="disc"><li class="listitem"> <a class="ulink" href="book.html" target="_top">Single webpage</a>: barebones HTML, with no CSS. </li><li class="listitem"> <a class="ulink" href="book.pdf" target="_top">PDF file</a>: printer-friendly. </li><li class="listitem"> <a class="ulink" href="book.epub" target="_top">EPUB file</a>: E-reader-friendly. </li><li class="listitem"> <a class="ulink" href="http://packages.debian.org/gitmagic" target="_top">Debian package</a>, <a class="ulink" href="http://packages.ubuntu.com/gitmagic" target="_top">Ubuntu package</a>: get a fast and local copy of this site. Handy <a class="ulink" href="http://csdcf.stanford.edu/status/" target="_top">when this server is offline</a>. </li><li class="listitem"> <a class="ulink" href="http://www.amazon.com/Git-Magic-Ben-Lynn/dp/1451523343/" target="_top">Physical book [Amazon.com</a>]: 64 pages, 15.24cm x 22.86cm, black and white. Handy when there is no electricity. </li></ul></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="_thanks"></a>Thanks!</h2></div></div></div><p>I’m humbled that so many people have worked on translations of these pages. I greatly appreciate having a wider audience because of the efforts of those named above.</p><p>Dustin Sallings, Alberto Bertogli, James Cameron, Douglas Livingstone, Michael Budde, Richard Albury, Tarmigan, Derek Mahar, Frode Aannevik, Keith Rarick, Andy Somerville, Ralf Recker, Øyvind A. Holm, Miklos Vajna, Sébastien Hinderer, Thomas Miedema, Joe Malin, Tyler Breisacher, Sonia Hamilton, Julian Haagsma, Romain Lespinasse, Sergey Litvinov, Oliver Ferrigni, David Toca, Сергей Сергеев, Joël Thieffry, and Baiju Muthukadan contributed corrections and improvements.</p><p>François Marier maintains the Debian package originally created by Daniel Baumann.</p><p>My gratitude goes to many others for your support and praise. I’m tempted to quote you here, but it might raise expectations to ridiculous heights.</p><p>If I’ve left you out by mistake, please tell me or just send me a patch!</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="_license"></a>License</h2></div></div></div><p>This guide is released under <a class="ulink" href="http://www.gnu.org/licenses/gpl-3.0.html" target="_top">the GNU General Public License, version 3</a> or any later version published by the Free Software Foundation.</p><p>Naturally, the source is kept in a Git repository, and can be obtained by typing:</p><pre class="literallayout">$ git clone git://repo.or.cz/gitmagic.git # Creates "gitmagic" directory.</pre><p>or from one of the mirrors:</p><pre class="literallayout">$ git clone git://github.com/blynn/gitmagic.git $ git clone git://git.assembla.com/gitmagic.git $ git clone git@bitbucket.org:blynn/gitmagic.git</pre><p>GitHub, Assembla, and Bitbucket support private repositories, the latter two for free.</p></div></div><script (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-1901330-2', 'auto'); ga('send', 'pageview'); </script></div></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10