CINXE.COM

Git - Git Objects

<!DOCTYPE html> <html lang="cs"> <head> <meta charset='utf-8'> <meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Git - Git Objects</title> <link href="/favicon.ico" rel='shortcut icon' type='image/x-icon'> <link rel="stylesheet" href="/application.min.css"> <script src="/js/modernizr.js"></script> <script src="/js/modernize.js"></script> </head> <body id="documentation"> <div class="inner"> <header> <a href="/"><img src="/images/logo@2x.png" width="110" height="46" alt="Git" /></a> <span id="tagline"></span> <script type="text/javascript"> const taglines = [ "fast-version-control", "everything-is-local", "distributed-even-if-your-workflow-isnt", "local-branching-on-the-cheap", "distributed-is-the-new-centralized" ]; var tagline = taglines[Math.floor(Math.random() * taglines.length)]; document.getElementById('tagline').innerHTML = '--' + tagline; </script> <form id="search" action="/search/results"> <input id="search-text" name="search" placeholder="Type / to search entire site…" autocomplete="off" type="text" /> </form> <div id="search-results"></div> </header> </div> <div class="inner"> <div id="content-wrapper"> <div tabindex="1" class="sidebar-btn"></div> <aside class="sidebar" id="sidebar"> <nav> <ul> <li> <a href="/about">About</a> <ul> </ul> </li> <li> <a href="/doc" class="active">Documentation</a> <ul class="expanded"> <li> <a href="/docs">Reference</a> </li> <li> <a href="/book" class="active">Book</a> </li> <li> <a href="/videos">Videos</a> </li> <li> <a href="/doc/ext">External Links</a> </li> </ul> </li> <li> <a href="/downloads">Downloads</a> <ul > <li> <a href="/downloads/guis">GUI Clients</a> </li> <li> <a href="/downloads/logos">Logos</a> </li> </ul> </li> <li> <a href="/community">Community</a> </li> </ul> <hr class="sidebar"> <p> This book is available in <a href="/book/en/v2/Git-Internals-Git-Objects">English</a>. </p> <p> Full translation available in <table> <tr><td><a href="/book/az/v2/Git%e2%80%99in-Daxili-%c4%b0%c5%9fl%c9%99ri-Git-Obyektl%c9%99ri">azərbaycan dili</a>,</td></tr> <tr><td><a href="/book/bg/v2/%d0%9f%d1%80%d0%b8%d0%bb%d0%be%d0%b6%d0%b5%d0%bd%d0%b8%d0%b5-B:-%d0%92%d0%b3%d1%80%d0%b0%d0%b6%d0%b4%d0%b0%d0%bd%d0%b5-%d0%bd%d0%b0-Git-%d0%b2-%d0%bf%d1%80%d0%b8%d0%bb%d0%be%d0%b6%d0%b5%d0%bd%d0%b8%d1%8f-Libgit2">български език</a>,</td></tr> <tr><td><a href="/book/de/v2/Git-Interna-Git-Objekte">Deutsch</a>,</td></tr> <tr><td><a href="/book/es/v2/Los-entresijos-internos-de-Git-Los-objetos-Git">Español</a>,</td></tr> <tr><td><a href="/book/fr/v2/Les-tripes-de-Git-Les-objets-de-Git">Français</a>,</td></tr> <tr><td><a href="/book/gr">Ελληνικά</a>,</td></tr> <tr><td><a href="/book/ja/v2/Git%e3%81%ae%e5%86%85%e5%81%b4-Git%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88">日本語</a>,</td></tr> <tr><td><a href="/book/ko/v2/Git%ec%9d%98-%eb%82%b4%eb%b6%80-Git-%ea%b0%9c%ec%b2%b4">한국어</a>,</td></tr> <tr><td><a href="/book/nl/v2/Git-Binnenwerk-Git-objecten">Nederlands</a>,</td></tr> <tr><td><a href="/book/ru/v2/Git-%d0%b8%d0%b7%d0%bd%d1%83%d1%82%d1%80%d0%b8-%d0%9e%d0%b1%d1%8a%d0%b5%d0%ba%d1%82%d1%8b-Git">Русский</a>,</td></tr> <tr><td><a href="/book/sl/v2/Notranjost-Gita-Objekti-Git">Slovenščina</a>,</td></tr> <tr><td><a href="/book/tl/v2/Mga-Panloob-ng-GIT-Git-Objects">Tagalog</a>,</td></tr> <tr><td><a href="/book/uk/v2/Git-%d0%b7%d1%81%d0%b5%d1%80%d0%b5%d0%b4%d0%b8%d0%bd%d0%b8-%d0%9e%d0%b1%e2%80%99%d1%94%d0%ba%d1%82%d0%b8-Git">Українська</a></td></tr> <tr><td><a href="/book/zh/v2/Git-%e5%86%85%e9%83%a8%e5%8e%9f%e7%90%86-Git-%e5%af%b9%e8%b1%a1">简体中文</a>,</td></tr> </table> </p> <p> Partial translations available in <table> <tr><td><a href="/book/cs/v2/Git-Internals-Git-Objects">Čeština</a>,</td></tr> <tr><td><a href="/book/mk/v2/%d0%92%d0%bd%d0%b0%d1%82%d1%80%d0%b5%d1%88%d0%bd%d0%be%d1%81%d1%82%d0%b0-%d0%bd%d0%b0-Git-Git-Objects">Македонски</a>,</td></tr> <tr><td><a href="/book/pl/v2/Mechanizmy-wewn%c4%99trzne-w-Git-Obiekty-Gita">Polski</a>,</td></tr> <tr><td><a href="/book/sr/v2/%d0%93%d0%b8%d1%82-%d0%b8%d0%b7%d0%bd%d1%83%d1%82%d1%80%d0%b0-%d0%93%d0%b8%d1%82-%d0%be%d0%b1%d1%98%d0%b5%d0%ba%d1%82%d0%b8">Српски</a>,</td></tr> <tr><td><a href="/book/uz/v2/Git-Internals-Git-Objects">Ўзбекча</a>,</td></tr> <tr><td><a href="/book/zh-tw/v2/Git-Internals-Git-Objects">繁體中文</a>,</td></tr> </table> </p> <p> Translations started for <table> <tr><td><a href="/book/be/v2/Git-Internals-Git-Objects">Беларуская</a>,</td></tr> <tr><td><a href="/book/fa/v2/Git-Internals-Git-Objects" dir="rtl">فارسی</a>,</td></tr> <tr><td><a href="/book/id/v2/Git-Internals-Git-Objects">Indonesian</a>,</td></tr> <tr><td><a href="/book/it/v2/Git-Internals-Git-Objects">Italiano</a>,</td></tr> <tr><td><a href="/book/ms/v2/Git-Internals-Git-Objects">Bahasa Melayu</a>,</td></tr> <tr><td><a href="/book/pt-br/v2/Funcionamento-Interno-do-Git-Objetos-do-Git">Português (Brasil)</a>,</td></tr> <tr><td><a href="/book/pt-pt/v2/Internos-do-Git-Git-Objects">Português (Portugal)</a>,</td></tr> <tr><td><a href="/book/sv/v2/Git-Internals-Git-Objects">Svenska</a>,</td></tr> <tr><td><a href="/book/tr/v2/Dahili-Git-%c3%96geleri-Git-Nesneleri">Türkçe</a>.</td></tr> </table> </p> <hr class="sidebar"/> <p> The source of this book is <a href="https://github.com/progit-cs/progit2-cs">hosted on GitHub.</a></br> Patches, suggestions and comments are welcome. </p> </nav> </aside> <div id="content"> <div id="book-chapters"> <a class="dropdown-trigger" id="book-chapters-trigger" data-panel-id="chapters-dropdown" href="#">Chapters ▾</a> <div class='dropdown-panel' id='chapters-dropdown'> <div class='three-column'> <div class="column-left"> <ol class='book-toc'> <li class='chapter'> <h2>1. <a href="/book/cs/v2/%c3%9avod-Spr%c3%a1va-verz%c3%ad">Úvod</a></h2> <ol> <li> 1.1 <a href="/book/cs/v2/%c3%9avod-Spr%c3%a1va-verz%c3%ad">Správa verzí</a> </li> <li> 1.2 <a href="/book/cs/v2/%c3%9avod-Stru%c4%8dn%c3%a1-historie-syst%c3%a9mu-Git">Stručná historie systému Git</a> </li> <li> 1.3 <a href="/book/cs/v2/%c3%9avod-Z%c3%a1klady-syst%c3%a9mu-Git">Základy systému Git</a> </li> <li> 1.4 <a href="/book/cs/v2/%c3%9avod-P%c5%99%c3%adkazov%c3%bd-%c5%99%c3%a1dek">Příkazový řádek</a> </li> <li> 1.5 <a href="/book/cs/v2/%c3%9avod-Instalace-syst%c3%a9mu-Git">Instalace systému Git</a> </li> <li> 1.6 <a href="/book/cs/v2/%c3%9avod-Prvn%c3%ad-nastaven%c3%ad-syst%c3%a9mu-Git">První nastavení systému Git</a> </li> <li> 1.7 <a href="/book/cs/v2/%c3%9avod-Z%c3%adsk%c3%a1n%c3%ad-n%c3%a1pov%c4%9bdy">Získání nápovědy</a> </li> <li> 1.8 <a href="/book/cs/v2/%c3%9avod-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>2. <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-Z%c3%adsk%c3%a1n%c3%ad-repozit%c3%a1%c5%99e-Git">Základy práce se systémem Git</a></h2> <ol> <li> 2.1 <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-Z%c3%adsk%c3%a1n%c3%ad-repozit%c3%a1%c5%99e-Git">Získání repozitáře Git</a> </li> <li> 2.2 <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-Nahr%c3%a1v%c3%a1n%c3%ad-zm%c4%9bn-do-repozit%c3%a1%c5%99e">Nahrávání změn do repozitáře</a> </li> <li> 2.3 <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-Zobrazen%c3%ad-historie-reviz%c3%ad">Zobrazení historie revizí</a> </li> <li> 2.4 <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-N%c3%a1vrat-do-p%c5%99edchoz%c3%adho-stavu">Návrat do předchozího stavu</a> </li> <li> 2.5 <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-Pr%c3%a1ce-se-vzd%c3%a1len%c3%bdmi-repozit%c3%a1%c5%99i">Práce se vzdálenými repozitáři</a> </li> <li> 2.6 <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-Pou%c5%be%c3%adv%c3%a1n%c3%ad-zna%c4%8dek">Používání značek</a> </li> <li> 2.7 <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-Aliasy-v-Gitu">Aliasy v Gitu</a> </li> <li> 2.8 <a href="/book/cs/v2/Z%c3%a1klady-pr%c3%a1ce-se-syst%c3%a9mem-Git-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>3. <a href="/book/cs/v2/V%c4%9btve-v-syst%c3%a9mu-Git-V%c4%9btve-v-kostce">Větve v systému Git</a></h2> <ol> <li> 3.1 <a href="/book/cs/v2/V%c4%9btve-v-syst%c3%a9mu-Git-V%c4%9btve-v-kostce">Větve v kostce</a> </li> <li> 3.2 <a href="/book/cs/v2/V%c4%9btve-v-syst%c3%a9mu-Git-Z%c3%a1klady-v%c4%9btven%c3%ad-a-slu%c4%8dov%c3%a1n%c3%ad">Základy větvení a slučování</a> </li> <li> 3.3 <a href="/book/cs/v2/V%c4%9btve-v-syst%c3%a9mu-Git-Spr%c3%a1va-v%c4%9btv%c3%ad">Správa větví</a> </li> <li> 3.4 <a href="/book/cs/v2/V%c4%9btve-v-syst%c3%a9mu-Git-Postupy-p%c5%99i-pr%c3%a1ci-s-v%c4%9btvemi">Postupy při práci s větvemi</a> </li> <li> 3.5 <a href="/book/cs/v2/V%c4%9btve-v-syst%c3%a9mu-Git-Vzd%c3%a1len%c3%a9-v%c4%9btve">Vzdálené větve</a> </li> <li> 3.6 <a href="/book/cs/v2/V%c4%9btve-v-syst%c3%a9mu-Git-P%c5%99eskl%c3%a1d%c3%a1n%c3%ad">Přeskládání</a> </li> <li> 3.7 <a href="/book/cs/v2/V%c4%9btve-v-syst%c3%a9mu-Git-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>4. <a href="/book/cs/v2/Git-na-serveru-Protokoly">Git na serveru</a></h2> <ol> <li> 4.1 <a href="/book/cs/v2/Git-na-serveru-Protokoly">Protokoly</a> </li> <li> 4.2 <a href="/book/cs/v2/Git-na-serveru-Zprovozn%c4%9bn%c3%ad-Gitu-na-serveru">Zprovoznění Gitu na serveru</a> </li> <li> 4.3 <a href="/book/cs/v2/Git-na-serveru-Generov%c3%a1n%c3%ad-ve%c5%99ejn%c3%a9ho-kl%c3%ad%c4%8de-SSH">Generování veřejného klíče SSH</a> </li> <li> 4.4 <a href="/book/cs/v2/Git-na-serveru-Nastaven%c3%ad-serveru">Nastavení serveru</a> </li> <li> 4.5 <a href="/book/cs/v2/Git-na-serveru-D%c3%a9mon-Git">Démon Git</a> </li> <li> 4.6 <a href="/book/cs/v2/Git-na-serveru-Chytr%c3%bd-HTTP">Chytrý HTTP</a> </li> <li> 4.7 <a href="/book/cs/v2/Git-na-serveru-GitWeb">GitWeb</a> </li> <li> 4.8 <a href="/book/cs/v2/Git-na-serveru-GitLab">GitLab</a> </li> <li> 4.9 <a href="/book/cs/v2/Git-na-serveru-Mo%c5%benosti-hostov%c3%a1n%c3%ad-u-t%c5%99et%c3%ad-strany">Možnosti hostování u třetí strany</a> </li> <li> 4.10 <a href="/book/cs/v2/Git-na-serveru-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>5. <a href="/book/cs/v2/Distribuovan%c3%bd-Git-Distribuovan%c3%a9-pracovn%c3%ad-postupy">Distribuovaný Git</a></h2> <ol> <li> 5.1 <a href="/book/cs/v2/Distribuovan%c3%bd-Git-Distribuovan%c3%a9-pracovn%c3%ad-postupy">Distribuované pracovní postupy</a> </li> <li> 5.2 <a href="/book/cs/v2/Distribuovan%c3%bd-Git-P%c5%99isp%c3%adv%c3%a1n%c3%ad-do-projektu">Přispívání do projektu</a> </li> <li> 5.3 <a href="/book/cs/v2/Distribuovan%c3%bd-Git-Spr%c3%a1va-projektu">Správa projektu</a> </li> <li> 5.4 <a href="/book/cs/v2/Distribuovan%c3%bd-Git-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> </ol> </div> <div class='column-middle'> <ol class='book-toc'> <li class='chapter'> <h2>6. <a href="/book/cs/v2/GitHub-Z%c5%99%c3%adzen%c3%ad-%c3%ba%c4%8dtu-a-%c3%baprava-konfigurace">GitHub</a></h2> <ol> <li> 6.1 <a href="/book/cs/v2/GitHub-Z%c5%99%c3%adzen%c3%ad-%c3%ba%c4%8dtu-a-%c3%baprava-konfigurace">Zřízení účtu a úprava konfigurace</a> </li> <li> 6.2 <a href="/book/cs/v2/GitHub-P%c5%99isp%c3%adv%c3%a1n%c3%ad-do-projektu">Přispívání do projektu</a> </li> <li> 6.3 <a href="/book/cs/v2/GitHub-Maintaining-a-Project">Maintaining a Project</a> </li> <li> 6.4 <a href="/book/cs/v2/GitHub-Managing-an-organization">Managing an organization</a> </li> <li> 6.5 <a href="/book/cs/v2/GitHub-Scripting-GitHub">Scripting GitHub</a> </li> <li> 6.6 <a href="/book/cs/v2/GitHub-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>7. <a href="/book/cs/v2/Git-Tools-Revision-Selection">Git Tools</a></h2> <ol> <li> 7.1 <a href="/book/cs/v2/Git-Tools-Revision-Selection">Revision Selection</a> </li> <li> 7.2 <a href="/book/cs/v2/Git-Tools-Interactive-Staging">Interactive Staging</a> </li> <li> 7.3 <a href="/book/cs/v2/Git-Tools-Stashing-and-Cleaning">Stashing and Cleaning</a> </li> <li> 7.4 <a href="/book/cs/v2/Git-Tools-Signing-Your-Work">Signing Your Work</a> </li> <li> 7.5 <a href="/book/cs/v2/Git-Tools-Searching">Searching</a> </li> <li> 7.6 <a href="/book/cs/v2/Git-Tools-Rewriting-History">Rewriting History</a> </li> <li> 7.7 <a href="/book/cs/v2/Git-Tools-Reset-Demystified">Reset Demystified</a> </li> <li> 7.8 <a href="/book/cs/v2/Git-Tools-Advanced-Merging">Advanced Merging</a> </li> <li> 7.9 <a href="/book/cs/v2/Git-Tools-Rerere">Rerere</a> </li> <li> 7.10 <a href="/book/cs/v2/Git-Tools-Lad%c4%9bn%c3%ad-v-syst%c3%a9mu-Git">Ladění v systému Git</a> </li> <li> 7.11 <a href="/book/cs/v2/Git-Tools-Submodules">Submodules</a> </li> <li> 7.12 <a href="/book/cs/v2/Git-Tools-Bundling">Bundling</a> </li> <li> 7.13 <a href="/book/cs/v2/Git-Tools-Replace">Replace</a> </li> <li> 7.14 <a href="/book/cs/v2/Git-Tools-Credential-Storage">Credential Storage</a> </li> <li> 7.15 <a href="/book/cs/v2/Git-Tools-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>8. <a href="/book/cs/v2/Customizing-Git-Git-Configuration">Customizing Git</a></h2> <ol> <li> 8.1 <a href="/book/cs/v2/Customizing-Git-Git-Configuration">Git Configuration</a> </li> <li> 8.2 <a href="/book/cs/v2/Customizing-Git-Atributy-Git">Atributy Git</a> </li> <li> 8.3 <a href="/book/cs/v2/Customizing-Git-Git-Hooks">Git Hooks</a> </li> <li> 8.4 <a href="/book/cs/v2/Customizing-Git-An-Example-Git-Enforced-Policy">An Example Git-Enforced Policy</a> </li> <li> 8.5 <a href="/book/cs/v2/Customizing-Git-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>9. <a href="/book/cs/v2/Git-a-ostatn%c3%ad-syst%c3%a9my-Git-as-a-Client">Git a ostatní systémy</a></h2> <ol> <li> 9.1 <a href="/book/cs/v2/Git-a-ostatn%c3%ad-syst%c3%a9my-Git-as-a-Client">Git as a Client</a> </li> <li> 9.2 <a href="/book/cs/v2/Git-a-ostatn%c3%ad-syst%c3%a9my-Migrating-to-Git">Migrating to Git</a> </li> <li> 9.3 <a href="/book/cs/v2/Git-a-ostatn%c3%ad-syst%c3%a9my-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>10. <a href="/book/cs/v2/Git-Internals-Plumbing-and-Porcelain">Git Internals</a></h2> <ol> <li> 10.1 <a href="/book/cs/v2/Git-Internals-Plumbing-and-Porcelain">Plumbing and Porcelain</a> </li> <li> 10.2 <a href="/book/cs/v2/Git-Internals-Git-Objects" class="active">Git Objects</a> </li> <li> 10.3 <a href="/book/cs/v2/Git-Internals-Git-References">Git References</a> </li> <li> 10.4 <a href="/book/cs/v2/Git-Internals-Bal%c3%ad%c4%8dkov%c3%a9-soubory">Balíčkové soubory</a> </li> <li> 10.5 <a href="/book/cs/v2/Git-Internals-The-Refspec">The Refspec</a> </li> <li> 10.6 <a href="/book/cs/v2/Git-Internals-P%c5%99enosov%c3%a9-protokoly">Přenosové protokoly</a> </li> <li> 10.7 <a href="/book/cs/v2/Git-Internals-Spr%c3%a1va-a-obnova-dat">Správa a obnova dat</a> </li> <li> 10.8 <a href="/book/cs/v2/Git-Internals-Environment-Variables">Environment Variables</a> </li> <li> 10.9 <a href="/book/cs/v2/Git-Internals-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> </ol> </div> <div class='column-right'> <ol class='book-toc'> <li class='chapter'> <h2>A1. <a href="/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces">Appendix A: Git in Other Environments</a></h2> <ol> <li> A1.1 <a href="/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces">Graphical Interfaces</a> </li> <li> A1.2 <a href="/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Visual-Studio">Git in Visual Studio</a> </li> <li> A1.3 <a href="/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Eclipse">Git in Eclipse</a> </li> <li> A1.4 <a href="/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Bash">Git in Bash</a> </li> <li> A1.5 <a href="/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Zsh">Git in Zsh</a> </li> <li> A1.6 <a href="/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Git-in-Powershell">Git in Powershell</a> </li> <li> A1.7 <a href="/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Shrnut%c3%ad">Shrnutí</a> </li> </ol> </li> <li class='chapter'> <h2>A2. <a href="/book/cs/v2/Appendix-B:-Embedding-Git-in-your-Applications-Command-line-Git">Appendix B: Embedding Git in your Applications</a></h2> <ol> <li> A2.1 <a href="/book/cs/v2/Appendix-B:-Embedding-Git-in-your-Applications-Command-line-Git">Command-line Git</a> </li> <li> A2.2 <a href="/book/cs/v2/Appendix-B:-Embedding-Git-in-your-Applications-Libgit2">Libgit2</a> </li> <li> A2.3 <a href="/book/cs/v2/Appendix-B:-Embedding-Git-in-your-Applications-JGit">JGit</a> </li> </ol> </li> <li class='chapter'> <h2>A3. <a href="/book/cs/v2/Appendix-C:-Git-Commands-Setup-and-Config">Appendix C: Git Commands</a></h2> <ol> <li> A3.1 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Setup-and-Config">Setup and Config</a> </li> <li> A3.2 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Getting-and-Creating-Projects">Getting and Creating Projects</a> </li> <li> A3.3 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Basic-Snapshotting">Basic Snapshotting</a> </li> <li> A3.4 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Branching-and-Merging">Branching and Merging</a> </li> <li> A3.5 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Sharing-and-Updating-Projects">Sharing and Updating Projects</a> </li> <li> A3.6 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Inspection-and-Comparison">Inspection and Comparison</a> </li> <li> A3.7 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Debugging">Debugging</a> </li> <li> A3.8 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Patching">Patching</a> </li> <li> A3.9 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Email">Email</a> </li> <li> A3.10 <a href="/book/cs/v2/Appendix-C:-Git-Commands-External-Systems">External Systems</a> </li> <li> A3.11 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Administration">Administration</a> </li> <li> A3.12 <a href="/book/cs/v2/Appendix-C:-Git-Commands-Plumbing-Commands">Plumbing Commands</a> </li> </ol> </li> </ol> </div> </div> </div> <span class="light" id="edition"> 2nd Edition </span> </div> <div id="main" data-pagefind-filter="category:book" data-pagefind-meta="category:Book" data-pagefind-weight="0.05" data-pagefind-body class="book edition2"> <h1>10.2 Git Internals - Git Objects</h1> <div> <h2 id="_objects">Git Objects</h2> <div class="paragraph"> <p>Git je obsahově adresovatelný systém souborů. Výborně. A co to znamená? Znamená to, že v jádru systému Git se nachází jednoduché úložiště dat, ke kterému lze přistupovat pomocí klíčů. Můžete do něj vložit jakýkoli obsah a na oplátku dostanete klíč, který můžete kdykoli v budoucnu použít k vyzvednutí obsahu. Abychom to předvedli, můžete použít nízkoúrovňový příkaz <code>hash-object</code>, který vezme určitá data, uloží je v adresáři <code>.git</code> a vrátí vám klíč, pod nímž jsou tato data uložena. Vytvořme nejprve nový repozitář Git. Můžeme se přesvědčit, že je adresář <code>objects</code> prázdný:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git init test Initialized empty Git repository in /tmp/test/.git/ $ cd test $ find .git/objects .git/objects .git/objects/info .git/objects/pack $ find .git/objects -type f</code></pre> </div> </div> <div class="paragraph"> <p>Git inicializoval adresář <code>objects</code> a vytvořil v něm podadresáře <code>pack</code> a <code>info</code>, nenajdeme tu však žádné skutečné soubory. Nyní můžete uložit kousek textu do databáze Git:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ echo 'test content' | git hash-object -w --stdin d670460b4b4aece5915caf5c68d12f560a9fe3e4</code></pre> </div> </div> <div class="paragraph"> <p>Parametr <code>-w</code> sděluje příkazu <code>hash-object</code>, aby objekt uložil. Bez parametru by vám příkaz jen sdělil, jaký klíč by byl přidělen. <code>--stdin</code> tells the command to read the content from stdin; if you don’t specify this, <code>hash-object</code> expects a file path at the end. Výstupem příkazu je 40znakový otisk kontrolního součtu (checksum hash). This is the SHA-1 hash – a checksum of the content you’re storing plus a header, which you’ll learn about in a bit. Nyní se můžete podívat, jak Git vaše data uložil:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ find .git/objects -type f .git/objects/d6/70460b4b4aece5915caf5c68d12f560a9fe3e4</code></pre> </div> </div> <div class="paragraph"> <p>Vidíte, že v adresáři <code>objects</code> přibyl nový soubor. This is how Git stores the content initially – as a single file per piece of content, named with the SHA-1 checksum of the content and its header. The subdirectory is named with the first 2 characters of the SHA-1, and the filename is the remaining 38 characters.</p> </div> <div class="paragraph"> <p>Obsah můžete ze systému Git zase vytáhnout, k tomu slouží příkaz <code>cat-file</code>. Tento příkaz je něco jako švýcarský nůž k prohlížení objektů Git. Přidáte-li k příkazu <code>cat-file</code> parametr <code>-p</code>, říkáte mu, aby zjistil typ obsahu a přehledně vám ho zobrazil:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git cat-file -p d670460b4b4aece5915caf5c68d12f560a9fe3e4 test content</code></pre> </div> </div> <div class="paragraph"> <p>Nyní tedy umíte vložit do systému Git určitý obsah a ten poté zase vytáhnout. Totéž můžete udělat také s obsahem v souborech. Na souboru můžete například provádět jednoduché verzování. Vytvořte nový soubor a uložte jeho obsah do své databáze:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ echo 'version 1' &gt; test.txt $ git hash-object -w test.txt 83baae61804e65cc73a7201a7252750c76066a30</code></pre> </div> </div> <div class="paragraph"> <p>Poté do souboru zapište nový obsah a znovu ho uložte:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ echo 'version 2' &gt; test.txt $ git hash-object -w test.txt 1f7a7a472abf3dd9643fd615f6da379c4acb3e3a</code></pre> </div> </div> <div class="paragraph"> <p>Vaše databáze obsahuje dvě nové verze souboru a počáteční obsah, který jste do ní vložili:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ find .git/objects -type f .git/objects/1f/7a7a472abf3dd9643fd615f6da379c4acb3e3a .git/objects/83/baae61804e65cc73a7201a7252750c76066a30 .git/objects/d6/70460b4b4aece5915caf5c68d12f560a9fe3e4</code></pre> </div> </div> <div class="paragraph"> <p>Soubor nyní můžete vrátit do první verze:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git cat-file -p 83baae61804e65cc73a7201a7252750c76066a30 &gt; test.txt $ cat test.txt version 1</code></pre> </div> </div> <div class="paragraph"> <p>Nebo do druhé verze:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git cat-file -p 1f7a7a472abf3dd9643fd615f6da379c4acb3e3a &gt; test.txt $ cat test.txt version 2</code></pre> </div> </div> <div class="paragraph"> <p>But remembering the SHA-1 key for each version of your file isn’t practical; plus, you aren’t storing the filename in your system – just the content. Tento typ objektu se nazývá blob. Zadáte-li příkaz <code>cat-file -t</code> v kombinaci s klíčem SHA-1 objektu, Git vám sdělí jeho typ, ať se jedná o jakýkoli objekt Git.</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git cat-file -t 1f7a7a472abf3dd9643fd615f6da379c4acb3e3a blob</code></pre> </div> </div> <div class="sect3"> <h3 id="_tree_objects">Tree Objects</h3> <div class="paragraph"> <p>The next type we’ll look at is the tree, which solves the problem of storing the filename and also allows you to store a group of files together. Git ukládá obsah podobným způsobem jako systém souborů UNIX, jen trochu jednodušeji. Veškerý obsah se ukládá v podobě objektů typu strom a blob. Stromy odpovídají položkám v adresáři UNIX a bloby víceméně odpovídají i-uzlům nebo obsahům souborů. Jeden objekt stromu obsahuje jednu nebo více položek stromu, z nichž každá obsahuje ukazatel SHA-1 na blob nebo podstrom s asociovaným režimem, typem a názvem souboru. For example, the most recent tree in a project may look something like this:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git cat-file -p master^{tree} 100644 blob a906cb2a4a904a152e80877d4088654daad0c859 README 100644 blob 8f94139338f9404f26296befa88755fc2598c289 Rakefile 040000 tree 99f1a6d12cb4b6f19c8655fca46c3ecf317074e0 lib</code></pre> </div> </div> <div class="paragraph"> <p>Syntaxe <code>master^{tree}</code> určuje objekt stromu, na nějž ukazuje poslední revize větve <code>master</code>. Notice that the <code>lib</code> subdirectory isn’t a blob but a pointer to another tree:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git cat-file -p 99f1a6d12cb4b6f19c8655fca46c3ecf317074e0 100644 blob 47c6340d6459e05787f644c2447d2595f5d3a54b simplegit.rb</code></pre> </div> </div> <div class="paragraph"> <p>Conceptually, the data that Git is storing is something like this:</p> </div> <div class="imageblock"> <div class="content"> <img src="/book/cs/v2/images/data-model-1.png" alt="Simple version of the Git data model."> </div> <div class="title">Figure 149. Simple version of the Git data model.</div> </div> <div class="paragraph"> <p>You can fairly easily create your own tree. Git normally creates a tree by taking the state of your staging area or index and writing a series of tree objects from it. Proto chcete-li vytvořit objekt stromu, musíte ze všeho nejdříve připravit soubory k zapsání, a vytvořit tak index. To create an index with a single entry – the first version of your <code>test.txt</code> file – you can use the plumbing command <code>update-index</code>. You use this command to artificially add the earlier version of the <code>test.txt</code> file to a new staging area. You must pass it the <code>--add</code> option because the file doesn’t yet exist in your staging area (you don’t even have a staging area set up yet) and <code>--cacheinfo</code> because the file you’re adding isn’t in your directory but is in your database. K tomu všemu přidáte režim, SHA-1 a název souboru:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git update-index --add --cacheinfo 100644 \ 83baae61804e65cc73a7201a7252750c76066a30 test.txt</code></pre> </div> </div> <div class="paragraph"> <p>In this case, you’re specifying a mode of <code>100644</code>, which means it’s a normal file. Other options are <code>100755</code>, which means it’s an executable file; and <code>120000</code>, which specifies a symbolic link. The mode is taken from normal UNIX modes but is much less flexible – these three modes are the only ones that are valid for files (blobs) in Git (although other modes are used for directories and submodules).</p> </div> <div class="paragraph"> <p>Nyní můžete použít příkaz <code>write-tree</code>, jímž zapíšete stav oblasti připravovaných změn neboli indexu do objektu stromu. No <code>-w</code> option is needed – calling <code>write-tree</code> automatically creates a tree object from the state of the index if that tree doesn’t yet exist:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git write-tree d8329fc1cc938780ffdd9f94e0d364e0ea74f579 $ git cat-file -p d8329fc1cc938780ffdd9f94e0d364e0ea74f579 100644 blob 83baae61804e65cc73a7201a7252750c76066a30 test.txt</code></pre> </div> </div> <div class="paragraph"> <p>Můžete si také ověřit, že jde skutečně o objekt stromu:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git cat-file -t d8329fc1cc938780ffdd9f94e0d364e0ea74f579 tree</code></pre> </div> </div> <div class="paragraph"> <p>You’ll now create a new tree with the second version of <code>test.txt</code> and a new file as well:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ echo 'new file' &gt; new.txt $ git update-index test.txt $ git update-index --add new.txt</code></pre> </div> </div> <div class="paragraph"> <p>Your staging area now has the new version of <code>test.txt</code> as well as the new file <code>new.txt</code>. Uložte tento strom (zaznamenáním stavu oblasti připravených změn neboli indexu do objektu stromu) a prohlédněte si výsledek:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git write-tree 0155eb4229851634a0f03eb265b69f5a2d56f341 $ git cat-file -p 0155eb4229851634a0f03eb265b69f5a2d56f341 100644 blob fa49b077972391ad58037050f2a75f74e3671e92 new.txt 100644 blob 1f7a7a472abf3dd9643fd615f6da379c4acb3e3a test.txt</code></pre> </div> </div> <div class="paragraph"> <p>Notice that this tree has both file entries and also that the <code>test.txt</code> SHA-1 is the “version 2” SHA-1 from earlier (<code>1f7a7a</code>). Just for fun, you’ll add the first tree as a subdirectory into this one. Stromy můžete do oblasti připravených změn načíst příkazem <code>read-tree</code>. V tomto případě můžete načíst existující strom jako podstrom do oblasti připravených změn pomocí parametru <code>--prefix</code>, který zadáte k příkazu <code>read-tree</code>:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git read-tree --prefix=bak d8329fc1cc938780ffdd9f94e0d364e0ea74f579 $ git write-tree 3c4e9cd789d88d8d89c1073707c3585e41b0e614 $ git cat-file -p 3c4e9cd789d88d8d89c1073707c3585e41b0e614 040000 tree d8329fc1cc938780ffdd9f94e0d364e0ea74f579 bak 100644 blob fa49b077972391ad58037050f2a75f74e3671e92 new.txt 100644 blob 1f7a7a472abf3dd9643fd615f6da379c4acb3e3a test.txt</code></pre> </div> </div> <div class="paragraph"> <p>If you created a working directory from the new tree you just wrote, you would get the two files in the top level of the working directory and a subdirectory named <code>bak</code> that contained the first version of the <code>test.txt</code> file. You can think of the data that Git contains for these structures as being like this:</p> </div> <div class="imageblock"> <div class="content"> <img src="/book/cs/v2/images/data-model-2.png" alt="The content structure of your current Git data."> </div> <div class="title">Figure 150. The content structure of your current Git data.</div> </div> </div> <div class="sect3"> <h3 id="_git_commit_objects">Commit Objects</h3> <div class="paragraph"> <p>Máte vytvořeny tři stromy označující různé snímky vašeho projektu, jež chcete sledovat. Původního problému jsme se však stále nezbavili: musíte si pamatovat všechny tři hodnoty SHA-1, abyste mohli snímky znovu vyvolat. You also don’t have any information about who saved the snapshots, when they were saved, or why they were saved. Toto jsou základní informace, které obsahuje objekt revize.</p> </div> <div class="paragraph"> <p>Pro vytvoření objektu revize zavolejte příkaz <code>commit-tree</code> a zadejte jeden SHA-1 stromu a eventuální objekty revize, které mu bezprostředně předcházely. Začněte prvním stromem, který jste zapsali:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ echo 'first commit' | git commit-tree d8329f fdf4fc3344e67ab068f836878b6c4951e3b15f3d</code></pre> </div> </div> <div class="paragraph"> <p>You will get a different hash value because of different creation time and author data. Replace commit and tag hashes with your own checksums further in this chapter. Nyní se můžete podívat na nově vytvořený objekt revize. Použijte příkaz <code>cat-file</code>:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git cat-file -p fdf4fc3 tree d8329fc1cc938780ffdd9f94e0d364e0ea74f579 author Scott Chacon &lt;schacon@gmail.com&gt; 1243040974 -0700 committer Scott Chacon &lt;schacon@gmail.com&gt; 1243040974 -0700 first commit</code></pre> </div> </div> <div class="paragraph"> <p>The format for a commit object is simple: it specifies the top-level tree for the snapshot of the project at that point; the author/committer information (which uses your <code>user.name</code> and <code>user.email</code> configuration settings and a timestamp); a blank line, and then the commit message.</p> </div> <div class="paragraph"> <p>Next, you’ll write the other two commit objects, each referencing the commit that came directly before it:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ echo 'second commit' | git commit-tree 0155eb -p fdf4fc3 cac0cab538b970a37ea1e769cbbde608743bc96d $ echo 'third commit' | git commit-tree 3c4e9c -p cac0cab 1a410efbd13591db07496601ebc7a059dd55cfe9</code></pre> </div> </div> <div class="paragraph"> <p>Všechny tři tyto objekty revizí ukazují na jeden ze tří stromů snímku, který jste vytvořili. Může se to zdát zvláštní, ale nyní máte vytvořenu skutečnou historii revizí Git, kterou lze zobrazit příkazem <code>git log</code> spuštěným pro hodnotu SHA-1 poslední revize:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ git log --stat 1a410e commit 1a410efbd13591db07496601ebc7a059dd55cfe9 Author: Scott Chacon &lt;schacon@gmail.com&gt; Date: Fri May 22 18:15:24 2009 -0700 third commit bak/test.txt | 1 + 1 file changed, 1 insertion(+) commit cac0cab538b970a37ea1e769cbbde608743bc96d Author: Scott Chacon &lt;schacon@gmail.com&gt; Date: Fri May 22 18:14:29 2009 -0700 second commit new.txt | 1 + test.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit fdf4fc3344e67ab068f836878b6c4951e3b15f3d Author: Scott Chacon &lt;schacon@gmail.com&gt; Date: Fri May 22 18:09:34 2009 -0700 first commit test.txt | 1 + 1 file changed, 1 insertion(+)</code></pre> </div> </div> <div class="paragraph"> <p>Úžasné! You’ve just done the low-level operations to build up a Git history without using any of the front end commands. This is essentially what Git does when you run the <code>git add</code> and <code>git commit</code> commands – it stores blobs for the files that have changed, updates the index, writes out trees, and writes commit objects that reference the top-level trees and the commits that came immediately before them. These three main Git objects – the blob, the tree, and the commit – are initially stored as separate files in your <code>.git/objects</code> directory. Toto jsou všechny objekty v ukázkovém adresáři spolu s komentářem k tomu co obsahují:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ find .git/objects -type f .git/objects/01/55eb4229851634a0f03eb265b69f5a2d56f341 # tree 2 .git/objects/1a/410efbd13591db07496601ebc7a059dd55cfe9 # commit 3 .git/objects/1f/7a7a472abf3dd9643fd615f6da379c4acb3e3a # test.txt v2 .git/objects/3c/4e9cd789d88d8d89c1073707c3585e41b0e614 # tree 3 .git/objects/83/baae61804e65cc73a7201a7252750c76066a30 # test.txt v1 .git/objects/ca/c0cab538b970a37ea1e769cbbde608743bc96d # commit 2 .git/objects/d6/70460b4b4aece5915caf5c68d12f560a9fe3e4 # 'test content' .git/objects/d8/329fc1cc938780ffdd9f94e0d364e0ea74f579 # tree 1 .git/objects/fa/49b077972391ad58037050f2a75f74e3671e92 # new.txt .git/objects/fd/f4fc3344e67ab068f836878b6c4951e3b15f3d # commit 1</code></pre> </div> </div> <div class="paragraph"> <p>If you follow all the internal pointers, you get an object graph something like this:</p> </div> <div class="imageblock"> <div class="content"> <img src="/book/cs/v2/images/data-model-3.png" alt="All the objects in your Git directory."> </div> <div class="title">Figure 151. All the objects in your Git directory.</div> </div> </div> <div class="sect3"> <h3 id="_ukládání_objektů">Ukládání objektů</h3> <div class="paragraph"> <p>We mentioned earlier that a header is stored with the content. Let’s take a minute to look at how Git stores its objects. You’ll see how to store a blob object – in this case, the string “what is up, doc?” – interactively in the Ruby scripting language.</p> </div> <div class="paragraph"> <p>Interaktivní režim Ruby spustíte příkazem <code>irb</code>:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">$ irb &gt;&gt; content = "what is up, doc?" =&gt; "what is up, doc?"</code></pre> </div> </div> <div class="paragraph"> <p>Git vytvoří záhlaví, které bude začínat typem objektu, jímž je v našem případě blob. Poté vloží mezeru, za níž bude následovat velikost obsahu a na konec nulový byte:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">&gt;&gt; header = "blob #{content.length}\0" =&gt; "blob 16\u0000"</code></pre> </div> </div> <div class="paragraph"> <p>Git vytvoří řetězec ze záhlaví a původního obsahu a vypočítá kontrolní součet SHA-1 tohoto nového obsahu. V Ruby můžete hodnotu SHA-1 daného řetězce spočítat tak, že příkazem <code>require</code> připojíte knihovnu pro počítání SHA1 a zavoláte <code>Digest::SHA1.hexdigest()</code> s daným řetězcem:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">&gt;&gt; store = header + content =&gt; "blob 16\u0000what is up, doc?" &gt;&gt; require 'digest/sha1' =&gt; true &gt;&gt; sha1 = Digest::SHA1.hexdigest(store) =&gt; "bd9dbf5aae1a3862dd1526723246b20206e5fc37"</code></pre> </div> </div> <div class="paragraph"> <p>Git zkomprimuje nový obsah metodou zlib, která je obsažena v knihovně zlib. Nejprve je třeba vyžádat si knihovnu a poté na obsah spustit příkaz <code>Zlib::Deflate.deflate()</code>:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">&gt;&gt; require 'zlib' =&gt; true &gt;&gt; zlib_content = Zlib::Deflate.deflate(store) =&gt; "x\x9CK\xCA\xC9OR04c(\xCFH,Q\xC8,V(-\xD0QH\xC9O\xB6\a\x00_\x1C\a\x9D"</code></pre> </div> </div> <div class="paragraph"> <p>Finally, you’ll write your zlib-deflated content to an object on disk. You’ll determine the path of the object you want to write out (the first two characters of the SHA-1 value being the subdirectory name, and the last 38 characters being the filename within that directory). In Ruby, you can use the <code>FileUtils.mkdir_p()</code> function to create the subdirectory if it doesn’t exist. Poté zadejte <code>File.open()</code> pro otevření souboru a voláním <code>write()</code> na vzniklý identifikátor souboru zapište do souboru právě zkomprimovaný (zlib) obsah:</p> </div> <div class="listingblock"> <div class="content"> <pre class="highlight"><code class="language-console" data-lang="console">&gt;&gt; path = '.git/objects/' + sha1[0,2] + '/' + sha1[2,38] =&gt; ".git/objects/bd/9dbf5aae1a3862dd1526723246b20206e5fc37" &gt;&gt; require 'fileutils' =&gt; true &gt;&gt; FileUtils.mkdir_p(File.dirname(path)) =&gt; ".git/objects/bd" &gt;&gt; File.open(path, 'w') { |f| f.write zlib_content } =&gt; 32</code></pre> </div> </div> <div class="paragraph"> <p>That’s it – you’ve created a valid Git blob object. All Git objects are stored the same way, just with different types – instead of the string blob, the header will begin with commit or tree. A navíc, zatímco obsahem blobu může být téměř cokoliv, obsah revize nebo stromu má velmi specifický formát.</p> </div> </div> <div id="nav"><a href="/book/cs/v2/Git-Internals-Plumbing-and-Porcelain">prev</a> | <a href="/book/cs/v2/Git-Internals-Git-References">next</a></div> </div> </div> </div> </div> <footer> <div class="site-source"> <a href="/site">About this site</a><br> Patches, suggestions, and comments are welcome. </div> <div class="sfc-member"> Git is a member of <a href="/sfc">Software Freedom Conservancy</a> </div> </footer> <a href="#top" class="no-js scrollToTop" id="scrollToTop" data-label="Scroll to top"> <img src="/images/icons/chevron-up@2x.png" width="20" height="20" alt="scroll-to-top"/> </a> <script src="/js/jquery-1.7.1.min.js"></script> <script src="/js/jquery-ui-1.8.18.custom.min.js"></script> <script src="/js/jquery.defaultvalue.js"></script> <script src="/js/session.min.js"></script> <script src="/js/application.min.js"></script> </div> </body> </html>

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