Autogenerated HTML docs for v2.45.1-204-gd8ab1
[git-htmldocs.git] / gittutorial.html
blob78b57f99a24dae7919ab1773c67012e131209ec1
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
7 <meta name="generator" content="AsciiDoc 10.2.0" />
8 <title>gittutorial(7)</title>
9 <style type="text/css">
10 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
12 /* Default font. */
13 body {
14 font-family: Georgia,serif;
17 /* Title font. */
18 h1, h2, h3, h4, h5, h6,
19 div.title, caption.title,
20 thead, p.table.header,
21 #toctitle,
22 #author, #revnumber, #revdate, #revremark,
23 #footer {
24 font-family: Arial,Helvetica,sans-serif;
27 body {
28 margin: 1em 5% 1em 5%;
31 a {
32 color: blue;
33 text-decoration: underline;
35 a:visited {
36 color: fuchsia;
39 em {
40 font-style: italic;
41 color: navy;
44 strong {
45 font-weight: bold;
46 color: #083194;
49 h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
51 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
56 h1, h2, h3 {
57 border-bottom: 2px solid silver;
59 h2 {
60 padding-top: 0.5em;
62 h3 {
63 float: left;
65 h3 + * {
66 clear: left;
68 h5 {
69 font-size: 1.0em;
72 div.sectionbody {
73 margin-left: 0;
76 hr {
77 border: 1px solid silver;
80 p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
85 ul, ol, li > p {
86 margin-top: 0;
88 ul > li { color: #aaa; }
89 ul > li > * { color: black; }
91 .monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
95 padding: 0;
96 margin: 0;
98 pre {
99 white-space: pre-wrap;
102 #author {
103 color: #527bbd;
104 font-weight: bold;
105 font-size: 1.1em;
107 #email {
109 #revnumber, #revdate, #revremark {
112 #footer {
113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
118 #footer-text {
119 float: left;
120 padding-bottom: 0.5em;
122 #footer-badges {
123 float: right;
124 padding-bottom: 0.5em;
127 #preamble {
128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
131 div.imageblock, div.exampleblock, div.verseblock,
132 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133 div.admonitionblock {
134 margin-top: 1.0em;
135 margin-bottom: 1.5em;
137 div.admonitionblock {
138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
144 div.content { /* Block element content. */
145 padding: 0;
148 /* Block element titles. */
149 div.title, caption.title {
150 color: #527bbd;
151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
156 div.title + * {
157 margin-top: 0;
160 td div.title:first-child {
161 margin-top: 0.0em;
163 div.content div.title:first-child {
164 margin-top: 0.0em;
166 div.content + div.title {
167 margin-top: 0.0em;
170 div.sidebarblock > div.content {
171 background: #ffffee;
172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
174 padding: 0.5em;
177 div.listingblock > div.content {
178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
181 padding: 0.5em;
184 div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
187 margin-right: 10%;
188 border-left: 5px solid #f0f0f0;
189 color: #888;
192 div.quoteblock > div.attribution {
193 padding-top: 0.5em;
194 text-align: right;
197 div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
201 div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
205 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
206 div.verseblock + div.attribution {
207 text-align: left;
210 div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
218 div.admonitionblock td.content {
219 padding-left: 0.5em;
220 border-left: 3px solid #dddddd;
223 div.exampleblock > div.content {
224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
228 div.imageblock div.content { padding-left: 0; }
229 span.image img { border-style: none; vertical-align: text-bottom; }
230 a.image:visited { color: white; }
232 dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
236 dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
239 font-style: normal;
240 color: navy;
242 dd > *:first-child {
243 margin-top: 0.1em;
246 ul, ol {
247 list-style-position: outside;
249 ol.arabic {
250 list-style-type: decimal;
252 ol.loweralpha {
253 list-style-type: lower-alpha;
255 ol.upperalpha {
256 list-style-type: upper-alpha;
258 ol.lowerroman {
259 list-style-type: lower-roman;
261 ol.upperroman {
262 list-style-type: upper-roman;
265 div.compact ul, div.compact ol,
266 div.compact p, div.compact p,
267 div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
272 tfoot {
273 font-weight: bold;
275 td > div.verse {
276 white-space: pre;
279 div.hdlist {
280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
283 div.hdlist tr {
284 padding-bottom: 15px;
286 dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
289 td.hdlist1 {
290 vertical-align: top;
291 font-style: normal;
292 padding-right: 0.8em;
293 color: navy;
295 td.hdlist2 {
296 vertical-align: top;
298 div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
303 .comment {
304 background: yellow;
307 .footnote, .footnoteref {
308 font-size: 0.8em;
311 span.footnote, span.footnoteref {
312 vertical-align: super;
315 #footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
320 #footnotes div.footnote {
321 margin: 0 0 5px 0;
324 #footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
334 div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
339 div.colist td img {
340 margin-top: 0.3em;
343 @media print {
344 #footer-badges { display: none; }
347 #toc {
348 margin-bottom: 2.5em;
351 #toctitle {
352 color: #527bbd;
353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
359 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
360 margin-top: 0;
361 margin-bottom: 0;
363 div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
367 div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
371 div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
376 span.aqua { color: aqua; }
377 span.black { color: black; }
378 span.blue { color: blue; }
379 span.fuchsia { color: fuchsia; }
380 span.gray { color: gray; }
381 span.green { color: green; }
382 span.lime { color: lime; }
383 span.maroon { color: maroon; }
384 span.navy { color: navy; }
385 span.olive { color: olive; }
386 span.purple { color: purple; }
387 span.red { color: red; }
388 span.silver { color: silver; }
389 span.teal { color: teal; }
390 span.white { color: white; }
391 span.yellow { color: yellow; }
393 span.aqua-background { background: aqua; }
394 span.black-background { background: black; }
395 span.blue-background { background: blue; }
396 span.fuchsia-background { background: fuchsia; }
397 span.gray-background { background: gray; }
398 span.green-background { background: green; }
399 span.lime-background { background: lime; }
400 span.maroon-background { background: maroon; }
401 span.navy-background { background: navy; }
402 span.olive-background { background: olive; }
403 span.purple-background { background: purple; }
404 span.red-background { background: red; }
405 span.silver-background { background: silver; }
406 span.teal-background { background: teal; }
407 span.white-background { background: white; }
408 span.yellow-background { background: yellow; }
410 span.big { font-size: 2em; }
411 span.small { font-size: 0.6em; }
413 span.underline { text-decoration: underline; }
414 span.overline { text-decoration: overline; }
415 span.line-through { text-decoration: line-through; }
417 div.unbreakable { page-break-inside: avoid; }
421 * xhtml11 specific
423 * */
425 div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
429 div.tableblock > table {
430 border: 3px solid #527bbd;
432 thead, p.table.header {
433 font-weight: bold;
434 color: #527bbd;
436 p.table {
437 margin-top: 0;
439 /* Because the table frame attribute is overridden by CSS in most browsers. */
440 div.tableblock > table[frame="void"] {
441 border-style: none;
443 div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
447 div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
454 * html5 specific
456 * */
458 table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
462 thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
466 p.tableblock {
467 margin-top: 0;
469 table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
476 th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
483 table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
487 table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
491 table.tableblock.frame-none {
492 border-style: hidden;
495 th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
498 th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
501 th.tableblock.halign-right, td.tableblock.halign-right {
502 text-align: right;
505 th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
508 th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
511 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
517 * manpage specific
519 * */
521 body.manpage h1 {
522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
527 body.manpage h2 {
528 border-style: none;
530 body.manpage div.sectionbody {
531 margin-left: 3em;
534 @media print {
535 body.manpage div#toc { display: none; }
539 </style>
540 <script type="text/javascript">
541 /*<![CDATA[*/
542 var asciidoc = { // Namespace.
544 /////////////////////////////////////////////////////////////////////
545 // Table Of Contents generator
546 /////////////////////////////////////////////////////////////////////
548 /* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
551 * Table Of Content generator
552 * Version: 0.4
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
561 // toclevels = 1..4.
562 toc: function (toclevels) {
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
572 return text;
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
594 iterate(i);
598 iterate(el);
599 return result;
602 var toc = document.getElementById("toc");
603 if (!toc) {
604 return;
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
640 /////////////////////////////////////////////////////////////////////
641 // Footnotes generator
642 /////////////////////////////////////////////////////////////////////
644 /* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
648 footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
651 var noteholder = document.getElementById("footnotes");
652 if (!noteholder) {
653 return;
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
659 entriesToRemove.push(entry);
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
708 install: function(toclevels) {
709 var timerId;
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
731 asciidoc.install();
732 /*]]>*/
733 </script>
734 </head>
735 <body class="manpage">
736 <div id="header">
737 <h1>
738 gittutorial(7) Manual Page
739 </h1>
740 <h2>NAME</h2>
741 <div class="sectionbody">
742 <p>gittutorial -
743 A tutorial introduction to Git
744 </p>
745 </div>
746 </div>
747 <div id="content">
748 <div class="sect1">
749 <h2 id="_synopsis">SYNOPSIS</h2>
750 <div class="sectionbody">
751 <div class="verseblock">
752 <pre class="content">git *</pre>
753 <div class="attribution">
754 </div></div>
755 </div>
756 </div>
757 <div class="sect1">
758 <h2 id="_description">DESCRIPTION</h2>
759 <div class="sectionbody">
760 <div class="paragraph"><p>This tutorial explains how to import a new project into Git, make
761 changes to it, and share changes with other developers.</p></div>
762 <div class="paragraph"><p>If you are instead primarily interested in using Git to fetch a project,
763 for example, to test the latest version, you may prefer to start with
764 the first two chapters of <a href="user-manual.html">The Git User&#8217;s Manual</a>.</p></div>
765 <div class="paragraph"><p>First, note that you can get documentation for a command such as
766 <code>git log --graph</code> with:</p></div>
767 <div class="listingblock">
768 <div class="content">
769 <pre><code>$ man git-log</code></pre>
770 </div></div>
771 <div class="paragraph"><p>or:</p></div>
772 <div class="listingblock">
773 <div class="content">
774 <pre><code>$ git help log</code></pre>
775 </div></div>
776 <div class="paragraph"><p>With the latter, you can use the manual viewer of your choice; see
777 <a href="git-help.html">git-help(1)</a> for more information.</p></div>
778 <div class="paragraph"><p>It is a good idea to introduce yourself to Git with your name and
779 public email address before doing any operation. The easiest
780 way to do so is:</p></div>
781 <div class="listingblock">
782 <div class="content">
783 <pre><code>$ git config --global user.name "Your Name Comes Here"
784 $ git config --global user.email you@yourdomain.example.com</code></pre>
785 </div></div>
786 </div>
787 </div>
788 <div class="sect1">
789 <h2 id="_importing_a_new_project">Importing a new project</h2>
790 <div class="sectionbody">
791 <div class="paragraph"><p>Assume you have a tarball <code>project.tar.gz</code> with your initial work. You
792 can place it under Git revision control as follows.</p></div>
793 <div class="listingblock">
794 <div class="content">
795 <pre><code>$ tar xzf project.tar.gz
796 $ cd project
797 $ git init</code></pre>
798 </div></div>
799 <div class="paragraph"><p>Git will reply</p></div>
800 <div class="listingblock">
801 <div class="content">
802 <pre><code>Initialized empty Git repository in .git/</code></pre>
803 </div></div>
804 <div class="paragraph"><p>You&#8217;ve now initialized the working directory&#8212;you may notice a new
805 directory created, named <code>.git</code>.</p></div>
806 <div class="paragraph"><p>Next, tell Git to take a snapshot of the contents of all files under the
807 current directory (note the <code>.</code>), with <code>git add</code>:</p></div>
808 <div class="listingblock">
809 <div class="content">
810 <pre><code>$ git add .</code></pre>
811 </div></div>
812 <div class="paragraph"><p>This snapshot is now stored in a temporary staging area which Git calls
813 the "index". You can permanently store the contents of the index in the
814 repository with <code>git commit</code>:</p></div>
815 <div class="listingblock">
816 <div class="content">
817 <pre><code>$ git commit</code></pre>
818 </div></div>
819 <div class="paragraph"><p>This will prompt you for a commit message. You&#8217;ve now stored the first
820 version of your project in Git.</p></div>
821 </div>
822 </div>
823 <div class="sect1">
824 <h2 id="_making_changes">Making changes</h2>
825 <div class="sectionbody">
826 <div class="paragraph"><p>Modify some files, then add their updated contents to the index:</p></div>
827 <div class="listingblock">
828 <div class="content">
829 <pre><code>$ git add file1 file2 file3</code></pre>
830 </div></div>
831 <div class="paragraph"><p>You are now ready to commit. You can see what is about to be committed
832 using <code>git diff</code> with the <code>--cached</code> option:</p></div>
833 <div class="listingblock">
834 <div class="content">
835 <pre><code>$ git diff --cached</code></pre>
836 </div></div>
837 <div class="paragraph"><p>(Without <code>--cached</code>, <code>git diff</code> will show you any changes that
838 you&#8217;ve made but not yet added to the index.) You can also get a brief
839 summary of the situation with <code>git status</code>:</p></div>
840 <div class="listingblock">
841 <div class="content">
842 <pre><code>$ git status
843 On branch master
844 Changes to be committed:
845 (use "git restore --staged &lt;file&gt;..." to unstage)
847 modified: file1
848 modified: file2
849 modified: file3</code></pre>
850 </div></div>
851 <div class="paragraph"><p>If you need to make any further adjustments, do so now, and then add any
852 newly modified content to the index. Finally, commit your changes with:</p></div>
853 <div class="listingblock">
854 <div class="content">
855 <pre><code>$ git commit</code></pre>
856 </div></div>
857 <div class="paragraph"><p>This will again prompt you for a message describing the change, and then
858 record a new version of the project.</p></div>
859 <div class="paragraph"><p>Alternatively, instead of running <code>git add</code> beforehand, you can use</p></div>
860 <div class="listingblock">
861 <div class="content">
862 <pre><code>$ git commit -a</code></pre>
863 </div></div>
864 <div class="paragraph"><p>which will automatically notice any modified (but not new) files, add
865 them to the index, and commit, all in one step.</p></div>
866 <div class="paragraph"><p>A note on commit messages: Though not required, it&#8217;s a good idea to
867 begin the commit message with a single short (no more than 50
868 characters) line summarizing the change, followed by a blank line and
869 then a more thorough description. The text up to the first blank line in
870 a commit message is treated as the commit title, and that title is used
871 throughout Git. For example, <a href="git-format-patch.html">git-format-patch(1)</a> turns a
872 commit into email, and it uses the title on the Subject line and the
873 rest of the commit in the body.</p></div>
874 </div>
875 </div>
876 <div class="sect1">
877 <h2 id="_git_tracks_content_not_files">Git tracks content not files</h2>
878 <div class="sectionbody">
879 <div class="paragraph"><p>Many revision control systems provide an <code>add</code> command that tells the
880 system to start tracking changes to a new file. Git&#8217;s <code>add</code> command
881 does something simpler and more powerful: <code>git add</code> is used both for new
882 and newly modified files, and in both cases it takes a snapshot of the
883 given files and stages that content in the index, ready for inclusion in
884 the next commit.</p></div>
885 </div>
886 </div>
887 <div class="sect1">
888 <h2 id="_viewing_project_history">Viewing project history</h2>
889 <div class="sectionbody">
890 <div class="paragraph"><p>At any point you can view the history of your changes using</p></div>
891 <div class="listingblock">
892 <div class="content">
893 <pre><code>$ git log</code></pre>
894 </div></div>
895 <div class="paragraph"><p>If you also want to see complete diffs at each step, use</p></div>
896 <div class="listingblock">
897 <div class="content">
898 <pre><code>$ git log -p</code></pre>
899 </div></div>
900 <div class="paragraph"><p>Often the overview of the change is useful to get a feel of
901 each step</p></div>
902 <div class="listingblock">
903 <div class="content">
904 <pre><code>$ git log --stat --summary</code></pre>
905 </div></div>
906 </div>
907 </div>
908 <div class="sect1">
909 <h2 id="_managing_branches">Managing branches</h2>
910 <div class="sectionbody">
911 <div class="paragraph"><p>A single Git repository can maintain multiple branches of
912 development. To create a new branch named <code>experimental</code>, use</p></div>
913 <div class="listingblock">
914 <div class="content">
915 <pre><code>$ git branch experimental</code></pre>
916 </div></div>
917 <div class="paragraph"><p>If you now run</p></div>
918 <div class="listingblock">
919 <div class="content">
920 <pre><code>$ git branch</code></pre>
921 </div></div>
922 <div class="paragraph"><p>you&#8217;ll get a list of all existing branches:</p></div>
923 <div class="listingblock">
924 <div class="content">
925 <pre><code> experimental
926 * master</code></pre>
927 </div></div>
928 <div class="paragraph"><p>The <code>experimental</code> branch is the one you just created, and the
929 <code>master</code> branch is a default branch that was created for you
930 automatically. The asterisk marks the branch you are currently on;
931 type</p></div>
932 <div class="listingblock">
933 <div class="content">
934 <pre><code>$ git switch experimental</code></pre>
935 </div></div>
936 <div class="paragraph"><p>to switch to the <code>experimental</code> branch. Now edit a file, commit the
937 change, and switch back to the <code>master</code> branch:</p></div>
938 <div class="listingblock">
939 <div class="content">
940 <pre><code>(edit file)
941 $ git commit -a
942 $ git switch master</code></pre>
943 </div></div>
944 <div class="paragraph"><p>Check that the change you made is no longer visible, since it was
945 made on the <code>experimental</code> branch and you&#8217;re back on the <code>master</code> branch.</p></div>
946 <div class="paragraph"><p>You can make a different change on the <code>master</code> branch:</p></div>
947 <div class="listingblock">
948 <div class="content">
949 <pre><code>(edit file)
950 $ git commit -a</code></pre>
951 </div></div>
952 <div class="paragraph"><p>at this point the two branches have diverged, with different changes
953 made in each. To merge the changes made in <code>experimental</code> into <code>master</code>, run</p></div>
954 <div class="listingblock">
955 <div class="content">
956 <pre><code>$ git merge experimental</code></pre>
957 </div></div>
958 <div class="paragraph"><p>If the changes don&#8217;t conflict, you&#8217;re done. If there are conflicts,
959 markers will be left in the problematic files showing the conflict;</p></div>
960 <div class="listingblock">
961 <div class="content">
962 <pre><code>$ git diff</code></pre>
963 </div></div>
964 <div class="paragraph"><p>will show this. Once you&#8217;ve edited the files to resolve the
965 conflicts,</p></div>
966 <div class="listingblock">
967 <div class="content">
968 <pre><code>$ git commit -a</code></pre>
969 </div></div>
970 <div class="paragraph"><p>will commit the result of the merge. Finally,</p></div>
971 <div class="listingblock">
972 <div class="content">
973 <pre><code>$ gitk</code></pre>
974 </div></div>
975 <div class="paragraph"><p>will show a nice graphical representation of the resulting history.</p></div>
976 <div class="paragraph"><p>At this point you could delete the <code>experimental</code> branch with</p></div>
977 <div class="listingblock">
978 <div class="content">
979 <pre><code>$ git branch -d experimental</code></pre>
980 </div></div>
981 <div class="paragraph"><p>This command ensures that the changes in the <code>experimental</code> branch are
982 already in the current branch.</p></div>
983 <div class="paragraph"><p>If you develop on a branch <code>crazy-idea</code>, then regret it, you can always
984 delete the branch with</p></div>
985 <div class="listingblock">
986 <div class="content">
987 <pre><code>$ git branch -D crazy-idea</code></pre>
988 </div></div>
989 <div class="paragraph"><p>Branches are cheap and easy, so this is a good way to try something
990 out.</p></div>
991 </div>
992 </div>
993 <div class="sect1">
994 <h2 id="_using_git_for_collaboration">Using Git for collaboration</h2>
995 <div class="sectionbody">
996 <div class="paragraph"><p>Suppose that Alice has started a new project with a Git repository in
997 <code>/home/alice/project</code>, and that Bob, who has a home directory on the
998 same machine, wants to contribute.</p></div>
999 <div class="paragraph"><p>Bob begins with:</p></div>
1000 <div class="listingblock">
1001 <div class="content">
1002 <pre><code>bob$ git clone /home/alice/project myrepo</code></pre>
1003 </div></div>
1004 <div class="paragraph"><p>This creates a new directory <code>myrepo</code> containing a clone of Alice&#8217;s
1005 repository. The clone is on an equal footing with the original
1006 project, possessing its own copy of the original project&#8217;s history.</p></div>
1007 <div class="paragraph"><p>Bob then makes some changes and commits them:</p></div>
1008 <div class="listingblock">
1009 <div class="content">
1010 <pre><code>(edit files)
1011 bob$ git commit -a
1012 (repeat as necessary)</code></pre>
1013 </div></div>
1014 <div class="paragraph"><p>When he&#8217;s ready, he tells Alice to pull changes from the repository
1015 at <code>/home/bob/myrepo</code>. She does this with:</p></div>
1016 <div class="listingblock">
1017 <div class="content">
1018 <pre><code>alice$ cd /home/alice/project
1019 alice$ git pull /home/bob/myrepo master</code></pre>
1020 </div></div>
1021 <div class="paragraph"><p>This merges the changes from Bob&#8217;s <code>master</code> branch into Alice&#8217;s
1022 current branch. If Alice has made her own changes in the meantime,
1023 then she may need to manually fix any conflicts.</p></div>
1024 <div class="paragraph"><p>The <code>pull</code> command thus performs two operations: it fetches changes
1025 from a remote branch, then merges them into the current branch.</p></div>
1026 <div class="paragraph"><p>Note that in general, Alice would want her local changes committed before
1027 initiating this <code>pull</code>. If Bob&#8217;s work conflicts with what Alice did since
1028 their histories forked, Alice will use her working tree and the index to
1029 resolve conflicts, and existing local changes will interfere with the
1030 conflict resolution process (Git will still perform the fetch but will
1031 refuse to merge&#8201;&#8212;&#8201;Alice will have to get rid of her local changes in
1032 some way and pull again when this happens).</p></div>
1033 <div class="paragraph"><p>Alice can peek at what Bob did without merging first, using the <code>fetch</code>
1034 command; this allows Alice to inspect what Bob did, using a special
1035 symbol <code>FETCH_HEAD</code>, in order to determine if he has anything worth
1036 pulling, like this:</p></div>
1037 <div class="listingblock">
1038 <div class="content">
1039 <pre><code>alice$ git fetch /home/bob/myrepo master
1040 alice$ git log -p HEAD..FETCH_HEAD</code></pre>
1041 </div></div>
1042 <div class="paragraph"><p>This operation is safe even if Alice has uncommitted local changes.
1043 The range notation <code>HEAD..FETCH_HEAD</code> means "show everything that is reachable
1044 from the <code>FETCH_HEAD</code> but exclude anything that is reachable from <code>HEAD</code>".
1045 Alice already knows everything that leads to her current state (<code>HEAD</code>),
1046 and reviews what Bob has in his state (<code>FETCH_HEAD</code>) that she has not
1047 seen with this command.</p></div>
1048 <div class="paragraph"><p>If Alice wants to visualize what Bob did since their histories forked
1049 she can issue the following command:</p></div>
1050 <div class="listingblock">
1051 <div class="content">
1052 <pre><code>$ gitk HEAD..FETCH_HEAD</code></pre>
1053 </div></div>
1054 <div class="paragraph"><p>This uses the same two-dot range notation we saw earlier with <code>git log</code>.</p></div>
1055 <div class="paragraph"><p>Alice may want to view what both of them did since they forked.
1056 She can use three-dot form instead of the two-dot form:</p></div>
1057 <div class="listingblock">
1058 <div class="content">
1059 <pre><code>$ gitk HEAD...FETCH_HEAD</code></pre>
1060 </div></div>
1061 <div class="paragraph"><p>This means "show everything that is reachable from either one, but
1062 exclude anything that is reachable from both of them".</p></div>
1063 <div class="paragraph"><p>Please note that these range notation can be used with both <code>gitk</code>
1064 and <code>git log</code>.</p></div>
1065 <div class="paragraph"><p>After inspecting what Bob did, if there is nothing urgent, Alice may
1066 decide to continue working without pulling from Bob. If Bob&#8217;s history
1067 does have something Alice would immediately need, Alice may choose to
1068 stash her work-in-progress first, do a <code>pull</code>, and then finally unstash
1069 her work-in-progress on top of the resulting history.</p></div>
1070 <div class="paragraph"><p>When you are working in a small closely knit group, it is not
1071 unusual to interact with the same repository over and over
1072 again. By defining <em>remote</em> repository shorthand, you can make
1073 it easier:</p></div>
1074 <div class="listingblock">
1075 <div class="content">
1076 <pre><code>alice$ git remote add bob /home/bob/myrepo</code></pre>
1077 </div></div>
1078 <div class="paragraph"><p>With this, Alice can perform the first part of the <code>pull</code> operation
1079 alone using the <code>git fetch</code> command without merging them with her own
1080 branch, using:</p></div>
1081 <div class="listingblock">
1082 <div class="content">
1083 <pre><code>alice$ git fetch bob</code></pre>
1084 </div></div>
1085 <div class="paragraph"><p>Unlike the longhand form, when Alice fetches from Bob using a
1086 remote repository shorthand set up with <code>git remote</code>, what was
1087 fetched is stored in a remote-tracking branch, in this case
1088 <code>bob/master</code>. So after this:</p></div>
1089 <div class="listingblock">
1090 <div class="content">
1091 <pre><code>alice$ git log -p master..bob/master</code></pre>
1092 </div></div>
1093 <div class="paragraph"><p>shows a list of all the changes that Bob made since he branched from
1094 Alice&#8217;s <code>master</code> branch.</p></div>
1095 <div class="paragraph"><p>After examining those changes, Alice
1096 could merge the changes into her <code>master</code> branch:</p></div>
1097 <div class="listingblock">
1098 <div class="content">
1099 <pre><code>alice$ git merge bob/master</code></pre>
1100 </div></div>
1101 <div class="paragraph"><p>This <code>merge</code> can also be done by <em>pulling from her own remote-tracking
1102 branch</em>, like this:</p></div>
1103 <div class="listingblock">
1104 <div class="content">
1105 <pre><code>alice$ git pull . remotes/bob/master</code></pre>
1106 </div></div>
1107 <div class="paragraph"><p>Note that git pull always merges into the current branch,
1108 regardless of what else is given on the command line.</p></div>
1109 <div class="paragraph"><p>Later, Bob can update his repo with Alice&#8217;s latest changes using</p></div>
1110 <div class="listingblock">
1111 <div class="content">
1112 <pre><code>bob$ git pull</code></pre>
1113 </div></div>
1114 <div class="paragraph"><p>Note that he doesn&#8217;t need to give the path to Alice&#8217;s repository;
1115 when Bob cloned Alice&#8217;s repository, Git stored the location of her
1116 repository in the repository configuration, and that location is
1117 used for pulls:</p></div>
1118 <div class="listingblock">
1119 <div class="content">
1120 <pre><code>bob$ git config --get remote.origin.url
1121 /home/alice/project</code></pre>
1122 </div></div>
1123 <div class="paragraph"><p>(The complete configuration created by <code>git clone</code> is visible using
1124 <code>git config -l</code>, and the <a href="git-config.html">git-config(1)</a> man page
1125 explains the meaning of each option.)</p></div>
1126 <div class="paragraph"><p>Git also keeps a pristine copy of Alice&#8217;s <code>master</code> branch under the
1127 name <code>origin/master</code>:</p></div>
1128 <div class="listingblock">
1129 <div class="content">
1130 <pre><code>bob$ git branch -r
1131 origin/master</code></pre>
1132 </div></div>
1133 <div class="paragraph"><p>If Bob later decides to work from a different host, he can still
1134 perform clones and pulls using the ssh protocol:</p></div>
1135 <div class="listingblock">
1136 <div class="content">
1137 <pre><code>bob$ git clone alice.org:/home/alice/project myrepo</code></pre>
1138 </div></div>
1139 <div class="paragraph"><p>Alternatively, Git has a native protocol, or can use http;
1140 see <a href="git-pull.html">git-pull(1)</a> for details.</p></div>
1141 <div class="paragraph"><p>Git can also be used in a CVS-like mode, with a central repository
1142 that various users push changes to; see <a href="git-push.html">git-push(1)</a> and
1143 <a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p></div>
1144 </div>
1145 </div>
1146 <div class="sect1">
1147 <h2 id="_exploring_history">Exploring history</h2>
1148 <div class="sectionbody">
1149 <div class="paragraph"><p>Git history is represented as a series of interrelated commits. We
1150 have already seen that the <code>git log</code> command can list those commits.
1151 Note that first line of each <code>git log</code> entry also gives a name for the
1152 commit:</p></div>
1153 <div class="listingblock">
1154 <div class="content">
1155 <pre><code>$ git log
1156 commit c82a22c39cbc32576f64f5c6b3f24b99ea8149c7
1157 Author: Junio C Hamano &lt;junkio@cox.net&gt;
1158 Date: Tue May 16 17:18:22 2006 -0700
1160 merge-base: Clarify the comments on post processing.</code></pre>
1161 </div></div>
1162 <div class="paragraph"><p>We can give this name to <code>git show</code> to see the details about this
1163 commit.</p></div>
1164 <div class="listingblock">
1165 <div class="content">
1166 <pre><code>$ git show c82a22c39cbc32576f64f5c6b3f24b99ea8149c7</code></pre>
1167 </div></div>
1168 <div class="paragraph"><p>But there are other ways to refer to commits. You can use any initial
1169 part of the name that is long enough to uniquely identify the commit:</p></div>
1170 <div class="listingblock">
1171 <div class="content">
1172 <pre><code>$ git show c82a22c39c # the first few characters of the name are
1173 # usually enough
1174 $ git show HEAD # the tip of the current branch
1175 $ git show experimental # the tip of the "experimental" branch</code></pre>
1176 </div></div>
1177 <div class="paragraph"><p>Every commit usually has one "parent" commit
1178 which points to the previous state of the project:</p></div>
1179 <div class="listingblock">
1180 <div class="content">
1181 <pre><code>$ git show HEAD^ # to see the parent of HEAD
1182 $ git show HEAD^^ # to see the grandparent of HEAD
1183 $ git show HEAD~4 # to see the great-great grandparent of HEAD</code></pre>
1184 </div></div>
1185 <div class="paragraph"><p>Note that merge commits may have more than one parent:</p></div>
1186 <div class="listingblock">
1187 <div class="content">
1188 <pre><code>$ git show HEAD^1 # show the first parent of HEAD (same as HEAD^)
1189 $ git show HEAD^2 # show the second parent of HEAD</code></pre>
1190 </div></div>
1191 <div class="paragraph"><p>You can also give commits names of your own; after running</p></div>
1192 <div class="listingblock">
1193 <div class="content">
1194 <pre><code>$ git tag v2.5 1b2e1d63ff</code></pre>
1195 </div></div>
1196 <div class="paragraph"><p>you can refer to <code>1b2e1d63ff</code> by the name <code>v2.5</code>. If you intend to
1197 share this name with other people (for example, to identify a release
1198 version), you should create a "tag" object, and perhaps sign it; see
1199 <a href="git-tag.html">git-tag(1)</a> for details.</p></div>
1200 <div class="paragraph"><p>Any Git command that needs to know a commit can take any of these
1201 names. For example:</p></div>
1202 <div class="listingblock">
1203 <div class="content">
1204 <pre><code>$ git diff v2.5 HEAD # compare the current HEAD to v2.5
1205 $ git branch stable v2.5 # start a new branch named "stable" based
1206 # at v2.5
1207 $ git reset --hard HEAD^ # reset your current branch and working
1208 # directory to its state at HEAD^</code></pre>
1209 </div></div>
1210 <div class="paragraph"><p>Be careful with that last command: in addition to losing any changes
1211 in the working directory, it will also remove all later commits from
1212 this branch. If this branch is the only branch containing those
1213 commits, they will be lost. Also, don&#8217;t use <code>git reset</code> on a
1214 publicly-visible branch that other developers pull from, as it will
1215 force needless merges on other developers to clean up the history.
1216 If you need to undo changes that you have pushed, use <code>git revert</code>
1217 instead.</p></div>
1218 <div class="paragraph"><p>The <code>git grep</code> command can search for strings in any version of your
1219 project, so</p></div>
1220 <div class="listingblock">
1221 <div class="content">
1222 <pre><code>$ git grep "hello" v2.5</code></pre>
1223 </div></div>
1224 <div class="paragraph"><p>searches for all occurrences of "hello" in <code>v2.5</code>.</p></div>
1225 <div class="paragraph"><p>If you leave out the commit name, <code>git grep</code> will search any of the
1226 files it manages in your current directory. So</p></div>
1227 <div class="listingblock">
1228 <div class="content">
1229 <pre><code>$ git grep "hello"</code></pre>
1230 </div></div>
1231 <div class="paragraph"><p>is a quick way to search just the files that are tracked by Git.</p></div>
1232 <div class="paragraph"><p>Many Git commands also take sets of commits, which can be specified
1233 in a number of ways. Here are some examples with <code>git log</code>:</p></div>
1234 <div class="listingblock">
1235 <div class="content">
1236 <pre><code>$ git log v2.5..v2.6 # commits between v2.5 and v2.6
1237 $ git log v2.5.. # commits since v2.5
1238 $ git log --since="2 weeks ago" # commits from the last 2 weeks
1239 $ git log v2.5.. Makefile # commits since v2.5 which modify
1240 # Makefile</code></pre>
1241 </div></div>
1242 <div class="paragraph"><p>You can also give <code>git log</code> a "range" of commits where the first is not
1243 necessarily an ancestor of the second; for example, if the tips of
1244 the branches <code>stable</code> and <code>master</code> diverged from a common
1245 commit some time ago, then</p></div>
1246 <div class="listingblock">
1247 <div class="content">
1248 <pre><code>$ git log stable..master</code></pre>
1249 </div></div>
1250 <div class="paragraph"><p>will list commits made in the <code>master</code> branch but not in the
1251 stable branch, while</p></div>
1252 <div class="listingblock">
1253 <div class="content">
1254 <pre><code>$ git log master..stable</code></pre>
1255 </div></div>
1256 <div class="paragraph"><p>will show the list of commits made on the stable branch but not
1257 the <code>master</code> branch.</p></div>
1258 <div class="paragraph"><p>The <code>git log</code> command has a weakness: it must present commits in a
1259 list. When the history has lines of development that diverged and
1260 then merged back together, the order in which <code>git log</code> presents
1261 those commits is meaningless.</p></div>
1262 <div class="paragraph"><p>Most projects with multiple contributors (such as the Linux kernel,
1263 or Git itself) have frequent merges, and <code>gitk</code> does a better job of
1264 visualizing their history. For example,</p></div>
1265 <div class="listingblock">
1266 <div class="content">
1267 <pre><code>$ gitk --since="2 weeks ago" drivers/</code></pre>
1268 </div></div>
1269 <div class="paragraph"><p>allows you to browse any commits from the last 2 weeks of commits
1270 that modified files under the <code>drivers</code> directory. (Note: you can
1271 adjust gitk&#8217;s fonts by holding down the control key while pressing
1272 "-" or "+".)</p></div>
1273 <div class="paragraph"><p>Finally, most commands that take filenames will optionally allow you
1274 to precede any filename by a commit, to specify a particular version
1275 of the file:</p></div>
1276 <div class="listingblock">
1277 <div class="content">
1278 <pre><code>$ git diff v2.5:Makefile HEAD:Makefile.in</code></pre>
1279 </div></div>
1280 <div class="paragraph"><p>You can also use <code>git show</code> to see any such file:</p></div>
1281 <div class="listingblock">
1282 <div class="content">
1283 <pre><code>$ git show v2.5:Makefile</code></pre>
1284 </div></div>
1285 </div>
1286 </div>
1287 <div class="sect1">
1288 <h2 id="_next_steps">Next Steps</h2>
1289 <div class="sectionbody">
1290 <div class="paragraph"><p>This tutorial should be enough to perform basic distributed revision
1291 control for your projects. However, to fully understand the depth
1292 and power of Git you need to understand two simple ideas on which it
1293 is based:</p></div>
1294 <div class="ulist"><ul>
1295 <li>
1297 The object database is the rather elegant system used to
1298 store the history of your project&#8212;files, directories, and
1299 commits.
1300 </p>
1301 </li>
1302 <li>
1304 The index file is a cache of the state of a directory tree,
1305 used to create commits, check out working directories, and
1306 hold the various trees involved in a merge.
1307 </p>
1308 </li>
1309 </ul></div>
1310 <div class="paragraph"><p>Part two of this tutorial explains the object
1311 database, the index file, and a few other odds and ends that you&#8217;ll
1312 need to make the most of Git. You can find it at <a href="gittutorial-2.html">gittutorial-2(7)</a>.</p></div>
1313 <div class="paragraph"><p>If you don&#8217;t want to continue with that right away, a few other
1314 digressions that may be interesting at this point are:</p></div>
1315 <div class="ulist"><ul>
1316 <li>
1318 <a href="git-format-patch.html">git-format-patch(1)</a>, <a href="git-am.html">git-am(1)</a>: These convert
1319 series of git commits into emailed patches, and vice versa,
1320 useful for projects such as the Linux kernel which rely heavily
1321 on emailed patches.
1322 </p>
1323 </li>
1324 <li>
1326 <a href="git-bisect.html">git-bisect(1)</a>: When there is a regression in your
1327 project, one way to track down the bug is by searching through
1328 the history to find the exact commit that&#8217;s to blame. <code>git bisect</code>
1329 can help you perform a binary search for that commit. It is
1330 smart enough to perform a close-to-optimal search even in the
1331 case of complex non-linear history with lots of merged branches.
1332 </p>
1333 </li>
1334 <li>
1336 <a href="gitworkflows.html">gitworkflows(7)</a>: Gives an overview of recommended
1337 workflows.
1338 </p>
1339 </li>
1340 <li>
1342 <a href="giteveryday.html">giteveryday(7)</a>: Everyday Git with 20 Commands Or So.
1343 </p>
1344 </li>
1345 <li>
1347 <a href="gitcvs-migration.html">gitcvs-migration(7)</a>: Git for CVS users.
1348 </p>
1349 </li>
1350 </ul></div>
1351 </div>
1352 </div>
1353 <div class="sect1">
1354 <h2 id="_see_also">SEE ALSO</h2>
1355 <div class="sectionbody">
1356 <div class="paragraph"><p><a href="gittutorial-2.html">gittutorial-2(7)</a>,
1357 <a href="gitcvs-migration.html">gitcvs-migration(7)</a>,
1358 <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>,
1359 <a href="gitglossary.html">gitglossary(7)</a>,
1360 <a href="git-help.html">git-help(1)</a>,
1361 <a href="gitworkflows.html">gitworkflows(7)</a>,
1362 <a href="giteveryday.html">giteveryday(7)</a>,
1363 <a href="user-manual.html">The Git User&#8217;s Manual</a></p></div>
1364 </div>
1365 </div>
1366 <div class="sect1">
1367 <h2 id="_git">GIT</h2>
1368 <div class="sectionbody">
1369 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
1370 </div>
1371 </div>
1372 </div>
1373 <div id="footnotes"><hr /></div>
1374 <div id="footer">
1375 <div id="footer-text">
1376 Last updated
1377 2023-10-18 13:44:22 PDT
1378 </div>
1379 </div>
1380 </body>
1381 </html>