2706 lines
114 KiB
HTML
2706 lines
114 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<meta name="generator" content="Asciidoctor 2.0.23"/>
|
|
<title>git(1)</title>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"/>
|
|
<style>
|
|
/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
|
|
/* Uncomment the following line when using as a custom stylesheet */
|
|
/* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
|
|
html{font-family:sans-serif;-webkit-text-size-adjust:100%}
|
|
a{background:none}
|
|
a:focus{outline:thin dotted}
|
|
a:active,a:hover{outline:0}
|
|
h1{font-size:2em;margin:.67em 0}
|
|
b,strong{font-weight:bold}
|
|
abbr{font-size:.9em}
|
|
abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
|
|
dfn{font-style:italic}
|
|
hr{height:0}
|
|
mark{background:#ff0;color:#000}
|
|
code,kbd,pre,samp{font-family:monospace;font-size:1em}
|
|
pre{white-space:pre-wrap}
|
|
q{quotes:"\201C" "\201D" "\2018" "\2019"}
|
|
small{font-size:80%}
|
|
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
|
|
sup{top:-.5em}
|
|
sub{bottom:-.25em}
|
|
img{border:0}
|
|
svg:not(:root){overflow:hidden}
|
|
figure{margin:0}
|
|
audio,video{display:inline-block}
|
|
audio:not([controls]){display:none;height:0}
|
|
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
|
|
legend{border:0;padding:0}
|
|
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
|
|
button,input{line-height:normal}
|
|
button,select{text-transform:none}
|
|
button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
|
|
button[disabled],html input[disabled]{cursor:default}
|
|
input[type=checkbox],input[type=radio]{padding:0}
|
|
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
|
|
textarea{overflow:auto;vertical-align:top}
|
|
table{border-collapse:collapse;border-spacing:0}
|
|
*,::before,::after{box-sizing:border-box}
|
|
html,body{font-size:100%}
|
|
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
|
|
a:hover{cursor:pointer}
|
|
img,object,embed{max-width:100%;height:auto}
|
|
object,embed{height:100%}
|
|
img{-ms-interpolation-mode:bicubic}
|
|
.left{float:left!important}
|
|
.right{float:right!important}
|
|
.text-left{text-align:left!important}
|
|
.text-right{text-align:right!important}
|
|
.text-center{text-align:center!important}
|
|
.text-justify{text-align:justify!important}
|
|
.hide{display:none}
|
|
img,object,svg{display:inline-block;vertical-align:middle}
|
|
textarea{height:auto;min-height:50px}
|
|
select{width:100%}
|
|
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
|
|
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
|
|
a{color:#2156a5;text-decoration:underline;line-height:inherit}
|
|
a:hover,a:focus{color:#1d4b8f}
|
|
a img{border:0}
|
|
p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
|
|
p aside{font-size:.875em;line-height:1.35;font-style:italic}
|
|
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
|
|
h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
|
|
h1{font-size:2.125em}
|
|
h2{font-size:1.6875em}
|
|
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
|
|
h4,h5{font-size:1.125em}
|
|
h6{font-size:1em}
|
|
hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
|
|
em,i{font-style:italic;line-height:inherit}
|
|
strong,b{font-weight:bold;line-height:inherit}
|
|
small{font-size:60%;line-height:inherit}
|
|
code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
|
|
ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
|
|
ul,ol{margin-left:1.5em}
|
|
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
|
|
ul.circle{list-style-type:circle}
|
|
ul.disc{list-style-type:disc}
|
|
ul.square{list-style-type:square}
|
|
ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
|
|
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
|
|
dl dt{margin-bottom:.3125em;font-weight:bold}
|
|
dl dd{margin-bottom:1.25em}
|
|
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
|
|
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
|
|
@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
|
|
h1{font-size:2.75em}
|
|
h2{font-size:2.3125em}
|
|
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
|
|
h4{font-size:1.4375em}}
|
|
table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
|
|
table thead,table tfoot{background:#f7f8f7}
|
|
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
|
|
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
|
|
table tr.even,table tr.alt{background:#f8f8f7}
|
|
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
|
|
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
|
|
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
|
|
.center{margin-left:auto;margin-right:auto}
|
|
.stretch{width:100%}
|
|
.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
|
|
.clearfix::after,.float-group::after{clear:both}
|
|
:not(pre).nobreak{word-wrap:normal}
|
|
:not(pre).nowrap{white-space:nowrap}
|
|
:not(pre).pre-wrap{white-space:pre-wrap}
|
|
:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
|
|
pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
|
|
pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
|
|
pre>code{display:block}
|
|
pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
|
|
em em{font-style:normal}
|
|
strong strong{font-weight:400}
|
|
.keyseq{color:rgba(51,51,51,.8)}
|
|
kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
|
|
.keyseq kbd:first-child{margin-left:0}
|
|
.keyseq kbd:last-child{margin-right:0}
|
|
.menuseq,.menuref{color:#000}
|
|
.menuseq b:not(.caret),.menuref{font-weight:inherit}
|
|
.menuseq{word-spacing:-.02em}
|
|
.menuseq b.caret{font-size:1.25em;line-height:.8}
|
|
.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
|
|
b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
|
|
b.button::before{content:"[";padding:0 3px 0 2px}
|
|
b.button::after{content:"]";padding:0 2px 0 3px}
|
|
p a>code:hover{color:rgba(0,0,0,.9)}
|
|
#header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
|
|
#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
|
|
#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
|
|
#content{margin-top:1.25em}
|
|
#content::before{content:none}
|
|
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
|
|
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
|
|
#header>h1:only-child{border-bottom:1px solid #dddddf;padding-bottom:8px}
|
|
#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
|
|
#header .details span:first-child{margin-left:-.125em}
|
|
#header .details span.email a{color:rgba(0,0,0,.85)}
|
|
#header .details br{display:none}
|
|
#header .details br+span::before{content:"\00a0\2013\00a0"}
|
|
#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
|
|
#header .details br+span#revremark::before{content:"\00a0|\00a0"}
|
|
#header #revnumber{text-transform:capitalize}
|
|
#header #revnumber::after{content:"\00a0"}
|
|
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
|
|
#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
|
|
#toc>ul{margin-left:.125em}
|
|
#toc ul.sectlevel0>li>a{font-style:italic}
|
|
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
|
|
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
|
|
#toc li{line-height:1.3334;margin-top:.3334em}
|
|
#toc a{text-decoration:none}
|
|
#toc a:active{text-decoration:underline}
|
|
#toctitle{color:#7a2518;font-size:1.2em}
|
|
@media screen and (min-width:768px){#toctitle{font-size:1.375em}
|
|
body.toc2{padding-left:15em;padding-right:0}
|
|
body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
|
|
#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
|
|
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
|
|
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
|
|
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
|
|
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
|
|
body.toc2.toc-right{padding-left:0;padding-right:15em}
|
|
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
|
|
@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
|
|
#toc.toc2{width:20em}
|
|
#toc.toc2 #toctitle{font-size:1.375em}
|
|
#toc.toc2>ul{font-size:.95em}
|
|
#toc.toc2 ul ul{padding-left:1.25em}
|
|
body.toc2.toc-right{padding-left:0;padding-right:20em}}
|
|
#content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
|
|
#content #toc>:first-child{margin-top:0}
|
|
#content #toc>:last-child{margin-bottom:0}
|
|
#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
|
|
#footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
|
|
#content{margin-bottom:.625em}
|
|
.sect1{padding-bottom:.625em}
|
|
@media screen and (min-width:768px){#content{margin-bottom:1.25em}
|
|
.sect1{padding-bottom:1.25em}}
|
|
.sect1:last-child{padding-bottom:0}
|
|
.sect1+.sect1{border-top:1px solid #e7e7e9}
|
|
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
|
|
#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
|
|
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
|
|
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
|
|
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
|
|
details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
|
|
details{margin-left:1.25rem}
|
|
details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
|
|
details>summary::-webkit-details-marker{display:none}
|
|
details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
|
|
details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
|
|
details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
|
|
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
|
|
table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
|
|
.paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
|
|
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
|
|
.admonitionblock>table td.icon{text-align:center;width:80px}
|
|
.admonitionblock>table td.icon img{max-width:none}
|
|
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
|
|
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
|
|
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
|
.exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
|
|
.sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
|
|
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
|
.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
|
|
.exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
|
.literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
|
|
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
|
|
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
|
|
.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
|
|
.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
|
|
.listingblock>.content{position:relative}
|
|
.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
|
|
.listingblock:hover code[data-lang]::before{display:block}
|
|
.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
|
|
.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
|
|
.listingblock pre.highlightjs{padding:0}
|
|
.listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
|
|
.listingblock pre.prettyprint{border-width:0}
|
|
.prettyprint{background:#f7f7f8}
|
|
pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
|
|
pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
|
|
pre.prettyprint li code[data-lang]::before{opacity:1}
|
|
pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
|
|
table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
|
|
table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
|
|
table.linenotable td.code{padding-left:.75em}
|
|
table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
|
|
pre.pygments span.linenos{display:inline-block;margin-right:.75em}
|
|
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
|
|
.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
|
|
.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
|
|
.quoteblock blockquote{margin:0;padding:0;border:0}
|
|
.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
|
|
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
|
|
.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
|
|
.verseblock{margin:0 1em 1.25em}
|
|
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
|
|
.verseblock pre strong{font-weight:400}
|
|
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
|
|
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
|
|
.quoteblock .attribution br,.verseblock .attribution br{display:none}
|
|
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
|
|
.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
|
|
.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
|
|
.quoteblock.abstract{margin:0 1em 1.25em;display:block}
|
|
.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
|
|
.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
|
|
.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
|
|
.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
|
|
.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
|
|
p.tableblock:last-child{margin-bottom:0}
|
|
td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
|
|
td.tableblock>.content>:last-child{margin-bottom:-1.25em}
|
|
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
|
|
table.grid-all>*>tr>*{border-width:1px}
|
|
table.grid-cols>*>tr>*{border-width:0 1px}
|
|
table.grid-rows>*>tr>*{border-width:1px 0}
|
|
table.frame-all{border-width:1px}
|
|
table.frame-ends{border-width:1px 0}
|
|
table.frame-sides{border-width:0 1px}
|
|
table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
|
|
table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
|
|
table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
|
|
table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
|
|
table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
|
|
th.halign-left,td.halign-left{text-align:left}
|
|
th.halign-right,td.halign-right{text-align:right}
|
|
th.halign-center,td.halign-center{text-align:center}
|
|
th.valign-top,td.valign-top{vertical-align:top}
|
|
th.valign-bottom,td.valign-bottom{vertical-align:bottom}
|
|
th.valign-middle,td.valign-middle{vertical-align:middle}
|
|
table thead th,table tfoot th{font-weight:bold}
|
|
tbody tr th{background:#f7f8f7}
|
|
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
|
|
p.tableblock>code:only-child{background:none;padding:0}
|
|
p.tableblock{font-size:1em}
|
|
ol{margin-left:1.75em}
|
|
ul li ol{margin-left:1.5em}
|
|
dl dd{margin-left:1.125em}
|
|
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
|
|
li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
|
|
ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
|
|
ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
|
|
ul.unstyled,ol.unstyled{margin-left:0}
|
|
li>p:empty:only-child::before{content:"";display:inline-block}
|
|
ul.checklist>li>p:first-child{margin-left:-1em}
|
|
ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
|
|
ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
|
|
ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
|
|
ul.inline>li{margin-left:1.25em}
|
|
.unstyled dl dt{font-weight:400;font-style:normal}
|
|
ol.arabic{list-style-type:decimal}
|
|
ol.decimal{list-style-type:decimal-leading-zero}
|
|
ol.loweralpha{list-style-type:lower-alpha}
|
|
ol.upperalpha{list-style-type:upper-alpha}
|
|
ol.lowerroman{list-style-type:lower-roman}
|
|
ol.upperroman{list-style-type:upper-roman}
|
|
ol.lowergreek{list-style-type:lower-greek}
|
|
.hdlist>table,.colist>table{border:0;background:none}
|
|
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
|
|
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
|
|
td.hdlist1{font-weight:bold;padding-bottom:1.25em}
|
|
td.hdlist2{word-wrap:anywhere}
|
|
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
|
|
.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
|
|
.colist td:not([class]):first-child img{max-width:none}
|
|
.colist td:not([class]):last-child{padding:.25em 0}
|
|
.thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
|
|
.imageblock.left{margin:.25em .625em 1.25em 0}
|
|
.imageblock.right{margin:.25em 0 1.25em .625em}
|
|
.imageblock>.title{margin-bottom:0}
|
|
.imageblock.thumb,.imageblock.th{border-width:6px}
|
|
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
|
|
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
|
|
.image.left{margin-right:.625em}
|
|
.image.right{margin-left:.625em}
|
|
a.image{text-decoration:none;display:inline-block}
|
|
a.image object{pointer-events:none}
|
|
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
|
|
sup.footnote a,sup.footnoteref a{text-decoration:none}
|
|
sup.footnote a:active,sup.footnoteref a:active,#footnotes .footnote a:first-of-type:active{text-decoration:underline}
|
|
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
|
|
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
|
|
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
|
|
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
|
|
#footnotes .footnote:last-of-type{margin-bottom:0}
|
|
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
|
|
div.unbreakable{page-break-inside:avoid}
|
|
.big{font-size:larger}
|
|
.small{font-size:smaller}
|
|
.underline{text-decoration:underline}
|
|
.overline{text-decoration:overline}
|
|
.line-through{text-decoration:line-through}
|
|
.aqua{color:#00bfbf}
|
|
.aqua-background{background:#00fafa}
|
|
.black{color:#000}
|
|
.black-background{background:#000}
|
|
.blue{color:#0000bf}
|
|
.blue-background{background:#0000fa}
|
|
.fuchsia{color:#bf00bf}
|
|
.fuchsia-background{background:#fa00fa}
|
|
.gray{color:#606060}
|
|
.gray-background{background:#7d7d7d}
|
|
.green{color:#006000}
|
|
.green-background{background:#007d00}
|
|
.lime{color:#00bf00}
|
|
.lime-background{background:#00fa00}
|
|
.maroon{color:#600000}
|
|
.maroon-background{background:#7d0000}
|
|
.navy{color:#000060}
|
|
.navy-background{background:#00007d}
|
|
.olive{color:#606000}
|
|
.olive-background{background:#7d7d00}
|
|
.purple{color:#600060}
|
|
.purple-background{background:#7d007d}
|
|
.red{color:#bf0000}
|
|
.red-background{background:#fa0000}
|
|
.silver{color:#909090}
|
|
.silver-background{background:#bcbcbc}
|
|
.teal{color:#006060}
|
|
.teal-background{background:#007d7d}
|
|
.white{color:#bfbfbf}
|
|
.white-background{background:#fafafa}
|
|
.yellow{color:#bfbf00}
|
|
.yellow-background{background:#fafa00}
|
|
span.icon>.fa{cursor:default}
|
|
a span.icon>.fa{cursor:inherit}
|
|
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
|
|
.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
|
|
.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
|
|
.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
|
|
.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
|
|
.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
|
|
.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
|
|
.conum[data-value] *{color:#fff!important}
|
|
.conum[data-value]+b{display:none}
|
|
.conum[data-value]::after{content:attr(data-value)}
|
|
pre .conum[data-value]{position:relative;top:-.125em}
|
|
b.conum *{color:inherit!important}
|
|
.conum:not([data-value]):empty{display:none}
|
|
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
|
|
h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
|
|
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
|
|
p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
|
|
p{margin-bottom:1.25rem}
|
|
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
|
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
|
.print-only{display:none!important}
|
|
@page{margin:1.25cm .75cm}
|
|
@media print{*{box-shadow:none!important;text-shadow:none!important}
|
|
html{font-size:80%}
|
|
a{color:inherit!important;text-decoration:underline!important}
|
|
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
|
|
a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
|
|
abbr[title]{border-bottom:1px dotted}
|
|
abbr[title]::after{content:" (" attr(title) ")"}
|
|
pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
|
|
thead{display:table-header-group}
|
|
svg{max-width:100%}
|
|
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
|
|
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
|
|
#header,#content,#footnotes,#footer{max-width:none}
|
|
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
|
|
#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
|
|
body.book #header{text-align:center}
|
|
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
|
|
body.book #header .details{border:0!important;display:block;padding:0!important}
|
|
body.book #header .details span:first-child{margin-left:0!important}
|
|
body.book #header .details br{display:block}
|
|
body.book #header .details br+span::before{content:none!important}
|
|
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
|
|
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
|
|
.listingblock code[data-lang]::before{display:block}
|
|
#footer{padding:0 .9375em}
|
|
.hide-on-print{display:none!important}
|
|
.print-only{display:block!important}
|
|
.hide-for-print{display:none!important}
|
|
.show-for-print{display:inherit!important}}
|
|
@media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
|
|
.sect1{padding:0!important}
|
|
.sect1+.sect1{border:0}
|
|
#footer{background:none}
|
|
#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
|
|
@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
|
|
</style>
|
|
<style>
|
|
pre>code {
|
|
display: inline;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="manpage">
|
|
<div id="header">
|
|
<h1>git(1) Manual Page</h1>
|
|
<h2 id="_name">NAME</h2>
|
|
<div class="sectionbody">
|
|
<p>git - the stupid content tracker</p>
|
|
</div>
|
|
</div>
|
|
<div id="content">
|
|
<div class="sect1">
|
|
<h2 id="_synopsis">SYNOPSIS</h2>
|
|
<div class="sectionbody">
|
|
<div class="verseblock">
|
|
<pre class="content"><em>git</em> [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
|
|
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
|
|
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]
|
|
[--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>]
|
|
[--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>]
|
|
<command> [<args>]</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_description">DESCRIPTION</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Git is a fast, scalable, distributed revision control system with an
|
|
unusually rich command set that provides both high-level operations
|
|
and full access to internals.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>See <a href="gittutorial.html">gittutorial(7)</a> to get started, then see
|
|
<a href="giteveryday.html">giteveryday(7)</a> for a useful minimum set of
|
|
commands. The <a href="user-manual.html">Git User’s Manual</a> has a more
|
|
in-depth introduction.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>After you mastered the basic concepts, you can come back to this
|
|
page to learn what commands Git offers. You can learn more about
|
|
individual Git commands with "git help command". <a href="gitcli.html">gitcli(7)</a>
|
|
manual page gives you an overview of the command-line command syntax.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>A formatted and hyperlinked copy of the latest Git documentation
|
|
can be viewed at <a href="https://git.github.io/htmldocs/git.html" class="bare">https://git.github.io/htmldocs/git.html</a>
|
|
or <a href="https://git-scm.com/docs" class="bare">https://git-scm.com/docs</a>.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_options">OPTIONS</h2>
|
|
<div class="sectionbody">
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1">-v</dt>
|
|
<dt class="hdlist1">--version</dt>
|
|
<dd>
|
|
<p>Prints the Git suite version that the <em>git</em> program came from.</p>
|
|
<div class="paragraph">
|
|
<p>This option is internally converted to <code>git</code> <code>version</code> ... and accepts
|
|
the same options as the <a href="git-version.html">git-version(1)</a> command. If <code>--help</code> is
|
|
also given, it takes precedence over <code>--version</code>.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1">-h</dt>
|
|
<dt class="hdlist1">--help</dt>
|
|
<dd>
|
|
<p>Prints the synopsis and a list of the most commonly used
|
|
commands. If the option <code>--all</code> or <code>-a</code> is given then all
|
|
available commands are printed. If a Git command is named this
|
|
option will bring up the manual page for that command.</p>
|
|
<div class="paragraph">
|
|
<p>Other options are available to control how the manual page is
|
|
displayed. See <a href="git-help.html">git-help(1)</a> for more information,
|
|
because <code>git</code> <code>--help</code> ... is converted internally into <code>git</code>
|
|
<code>help</code> ....</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1">-C <path></dt>
|
|
<dd>
|
|
<p>Run as if git was started in <em><path></em> instead of the current working
|
|
directory. When multiple <code>-C</code> options are given, each subsequent
|
|
non-absolute <code>-C</code> <em><path></em> is interpreted relative to the preceding <code>-C</code>
|
|
<em><path></em>. If <em><path></em> is present but empty, e.g. <code>-C</code> "", then the
|
|
current working directory is left unchanged.</p>
|
|
<div class="paragraph">
|
|
<p>This option affects options that expect path name like <code>--git-dir</code> and
|
|
<code>--work-tree</code> in that their interpretations of the path names would be
|
|
made relative to the working directory caused by the <code>-C</code> option. For
|
|
example the following invocations are equivalent:</p>
|
|
</div>
|
|
<div class="literalblock">
|
|
<div class="content">
|
|
<pre>git --git-dir=a.git --work-tree=b -C c status
|
|
git --git-dir=c/a.git --work-tree=c/b status</pre>
|
|
</div>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1">-c <name>=<value></dt>
|
|
<dd>
|
|
<p>Pass a configuration parameter to the command. The value
|
|
given will override values from configuration files.
|
|
The <name> is expected in the same format as listed by
|
|
<em>git config</em> (subkeys separated by dots).</p>
|
|
<div class="paragraph">
|
|
<p>Note that omitting the <code>=</code> in <code>git</code> <code>-c</code> <code>foo.bar</code> ... is allowed and sets
|
|
<code>foo.bar</code> to the boolean true value (just like [<code>foo</code>]<code>bar</code> would in a
|
|
config file). Including the equals but with an empty value (like <code>git</code> <code>-c</code>
|
|
<code>foo.bar=</code> ...) sets <code>foo.bar</code> to the empty string which <code>git</code> <code>config</code>
|
|
<code>--type=bool</code> will convert to <code>false</code>.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1">--config-env=<name>=<envvar></dt>
|
|
<dd>
|
|
<p>Like <code>-c</code> <em><name></em><code>=</code><em><value></em>, give configuration variable
|
|
<em><name></em> a value, where <envvar> is the name of an
|
|
environment variable from which to retrieve the value. Unlike
|
|
<code>-c</code> there is no shortcut for directly setting the value to an
|
|
empty string, instead the environment variable itself must be
|
|
set to the empty string. It is an error if the <em><envvar></em> does not exist
|
|
in the environment. <em><envvar></em> may not contain an equals sign
|
|
to avoid ambiguity with <em><name></em> containing one.</p>
|
|
<div class="paragraph">
|
|
<p>This is useful for cases where you want to pass transitory
|
|
configuration options to git, but are doing so on operating systems
|
|
where other processes might be able to read your command line
|
|
(e.g. <code>/proc/self/cmdline</code>), but not your environment
|
|
(e.g. <code>/proc/self/environ</code>). That behavior is the default on
|
|
Linux, but may not be on your system.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Note that this might add security for variables such as
|
|
<code>http.extraHeader</code> where the sensitive information is part of
|
|
the value, but not e.g. <code>url.</code><em><base></em><code>.insteadOf</code> where the
|
|
sensitive information can be part of the key.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1">--exec-path[=<path>]</dt>
|
|
<dd>
|
|
<p>Path to wherever your core Git programs are installed.
|
|
This can also be controlled by setting the GIT_EXEC_PATH
|
|
environment variable. If no path is given, <em>git</em> will print
|
|
the current setting and then exit.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--html-path</dt>
|
|
<dd>
|
|
<p>Print the path, without trailing slash, where Git’s HTML
|
|
documentation is installed and exit.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--man-path</dt>
|
|
<dd>
|
|
<p>Print the manpath (see <code>man</code>(<code>1</code>)) for the man pages for
|
|
this version of Git and exit.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--info-path</dt>
|
|
<dd>
|
|
<p>Print the path where the Info files documenting this
|
|
version of Git are installed and exit.</p>
|
|
</dd>
|
|
<dt class="hdlist1">-p</dt>
|
|
<dt class="hdlist1">--paginate</dt>
|
|
<dd>
|
|
<p>Pipe all output into <em>less</em> (or if set, $PAGER) if standard
|
|
output is a terminal. This overrides the <code>pager.</code><em><cmd></em>
|
|
configuration options (see the "Configuration Mechanism" section
|
|
below).</p>
|
|
</dd>
|
|
<dt class="hdlist1">-P</dt>
|
|
<dt class="hdlist1">--no-pager</dt>
|
|
<dd>
|
|
<p>Do not pipe Git output into a pager.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--git-dir=<path></dt>
|
|
<dd>
|
|
<p>Set the path to the repository (".git" directory). This can also be
|
|
controlled by setting the <code>GIT_DIR</code> environment variable. It can be
|
|
an absolute path or relative path to current working directory.</p>
|
|
<div class="paragraph">
|
|
<p>Specifying the location of the ".git" directory using this
|
|
option (or <code>GIT_DIR</code> environment variable) turns off the
|
|
repository discovery that tries to find a directory with
|
|
".git" subdirectory (which is how the repository and the
|
|
top-level of the working tree are discovered), and tells Git
|
|
that you are at the top level of the working tree. If you
|
|
are not at the top-level directory of the working tree, you
|
|
should tell Git where the top-level of the working tree is,
|
|
with the <code>--work-tree=</code><em><path></em> option (or <code>GIT_WORK_TREE</code>
|
|
environment variable)</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>If you just want to run git as if it was started in <em><path></em> then use
|
|
<code>git</code> <code>-C</code> <em><path></em>.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1">--work-tree=<path></dt>
|
|
<dd>
|
|
<p>Set the path to the working tree. It can be an absolute path
|
|
or a path relative to the current working directory.
|
|
This can also be controlled by setting the GIT_WORK_TREE
|
|
environment variable and the core.worktree configuration
|
|
variable (see core.worktree in <a href="git-config.html">git-config(1)</a> for a
|
|
more detailed discussion).</p>
|
|
</dd>
|
|
<dt class="hdlist1">--namespace=<path></dt>
|
|
<dd>
|
|
<p>Set the Git namespace. See <a href="gitnamespaces.html">gitnamespaces(7)</a> for more
|
|
details. Equivalent to setting the <code>GIT_NAMESPACE</code> environment
|
|
variable.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--bare</dt>
|
|
<dd>
|
|
<p>Treat the repository as a bare repository. If GIT_DIR
|
|
environment is not set, it is set to the current working
|
|
directory.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--no-replace-objects</dt>
|
|
<dd>
|
|
<p>Do not use replacement refs to replace Git objects.
|
|
This is equivalent to exporting the <code>GIT_NO_REPLACE_OBJECTS</code>
|
|
environment variable with any value.
|
|
See <a href="git-replace.html">git-replace(1)</a> for more information.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--no-lazy-fetch</dt>
|
|
<dd>
|
|
<p>Do not fetch missing objects from the promisor remote on
|
|
demand. Useful together with <code>git</code> <code>cat-file</code> <code>-e</code> <em><object></em> to
|
|
see if the object is locally available.
|
|
This is equivalent to setting the <code>GIT_NO_LAZY_FETCH</code>
|
|
environment variable to <code>1</code>.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--no-optional-locks</dt>
|
|
<dd>
|
|
<p>Do not perform optional operations that require locks. This is
|
|
equivalent to setting the <code>GIT_OPTIONAL_LOCKS</code> to <code>0</code>.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--no-advice</dt>
|
|
<dd>
|
|
<p>Disable all advice hints from being printed.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--literal-pathspecs</dt>
|
|
<dd>
|
|
<p>Treat pathspecs literally (i.e. no globbing, no pathspec magic).
|
|
This is equivalent to setting the <code>GIT_LITERAL_PATHSPECS</code> environment
|
|
variable to <code>1</code>.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--glob-pathspecs</dt>
|
|
<dd>
|
|
<p>Add "glob" magic to all pathspec. This is equivalent to setting
|
|
the <code>GIT_GLOB_PATHSPECS</code> environment variable to <code>1</code>. Disabling
|
|
globbing on individual pathspecs can be done using pathspec
|
|
magic ":(literal)"</p>
|
|
</dd>
|
|
<dt class="hdlist1">--noglob-pathspecs</dt>
|
|
<dd>
|
|
<p>Add "literal" magic to all pathspec. This is equivalent to setting
|
|
the <code>GIT_NOGLOB_PATHSPECS</code> environment variable to <code>1</code>. Enabling
|
|
globbing on individual pathspecs can be done using pathspec
|
|
magic ":(glob)"</p>
|
|
</dd>
|
|
<dt class="hdlist1">--icase-pathspecs</dt>
|
|
<dd>
|
|
<p>Add "icase" magic to all pathspec. This is equivalent to setting
|
|
the <code>GIT_ICASE_PATHSPECS</code> environment variable to <code>1</code>.</p>
|
|
</dd>
|
|
<dt class="hdlist1">--list-cmds=<group>[,<group>…​]</dt>
|
|
<dd>
|
|
<p>List commands by group. This is an internal/experimental
|
|
option and may change or be removed in the future. Supported
|
|
groups are: builtins, parseopt (builtin commands that use
|
|
parse-options), main (all commands in libexec directory),
|
|
others (all other commands in <code>$PATH</code> that have git- prefix),
|
|
list-<category> (see categories in command-list.txt),
|
|
nohelpers (exclude helper commands), alias and config
|
|
(retrieve command list from config variable completion.commands)</p>
|
|
</dd>
|
|
<dt class="hdlist1">--attr-source=<tree-ish></dt>
|
|
<dd>
|
|
<p>Read gitattributes from <tree-ish> instead of the worktree. See
|
|
<a href="gitattributes.html">gitattributes(5)</a>. This is equivalent to setting the
|
|
<code>GIT_ATTR_SOURCE</code> environment variable.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_git_commands">GIT COMMANDS</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>We divide Git into high level ("porcelain") commands and low level
|
|
("plumbing") commands.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_high_level_commands_porcelain">High-level commands (porcelain)</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>We separate the porcelain commands into the main commands and some
|
|
ancillary user utilities.</p>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_main_porcelain_commands">Main porcelain commands</h3>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-add.html">git-add(1)</a></dt>
|
|
<dd>
|
|
<p>Add file contents to the index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-am.html">git-am(1)</a></dt>
|
|
<dd>
|
|
<p>Apply a series of patches from a mailbox.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-archive.html">git-archive(1)</a></dt>
|
|
<dd>
|
|
<p>Create an archive of files from a named tree.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-backfill.html">git-backfill(1)</a></dt>
|
|
<dd>
|
|
<p>Download missing objects in a partial clone.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-bisect.html">git-bisect(1)</a></dt>
|
|
<dd>
|
|
<p>Use binary search to find the commit that introduced a bug.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-branch.html">git-branch(1)</a></dt>
|
|
<dd>
|
|
<p>List, create, or delete branches.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-bundle.html">git-bundle(1)</a></dt>
|
|
<dd>
|
|
<p>Move objects and refs by archive.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-checkout.html">git-checkout(1)</a></dt>
|
|
<dd>
|
|
<p>Switch branches or restore working tree files.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-cherry-pick.html">git-cherry-pick(1)</a></dt>
|
|
<dd>
|
|
<p>Apply the changes introduced by some existing commits.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-citool.html">git-citool(1)</a></dt>
|
|
<dd>
|
|
<p>Graphical alternative to git-commit.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-clean.html">git-clean(1)</a></dt>
|
|
<dd>
|
|
<p>Remove untracked files from the working tree.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-clone.html">git-clone(1)</a></dt>
|
|
<dd>
|
|
<p>Clone a repository into a new directory.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-commit.html">git-commit(1)</a></dt>
|
|
<dd>
|
|
<p>Record changes to the repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-describe.html">git-describe(1)</a></dt>
|
|
<dd>
|
|
<p>Give an object a human readable name based on an available ref.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-diff.html">git-diff(1)</a></dt>
|
|
<dd>
|
|
<p>Show changes between commits, commit and working tree, etc.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-fetch.html">git-fetch(1)</a></dt>
|
|
<dd>
|
|
<p>Download objects and refs from another repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-format-patch.html">git-format-patch(1)</a></dt>
|
|
<dd>
|
|
<p>Prepare patches for e-mail submission.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-gc.html">git-gc(1)</a></dt>
|
|
<dd>
|
|
<p>Cleanup unnecessary files and optimize the local repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-grep.html">git-grep(1)</a></dt>
|
|
<dd>
|
|
<p>Print lines matching a pattern.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-gui.html">git-gui(1)</a></dt>
|
|
<dd>
|
|
<p>A portable graphical interface to Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-init.html">git-init(1)</a></dt>
|
|
<dd>
|
|
<p>Create an empty Git repository or reinitialize an existing one.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-log.html">git-log(1)</a></dt>
|
|
<dd>
|
|
<p>Show commit logs.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-maintenance.html">git-maintenance(1)</a></dt>
|
|
<dd>
|
|
<p>Run tasks to optimize Git repository data.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-merge.html">git-merge(1)</a></dt>
|
|
<dd>
|
|
<p>Join two or more development histories together.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-mv.html">git-mv(1)</a></dt>
|
|
<dd>
|
|
<p>Move or rename a file, a directory, or a symlink.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-notes.html">git-notes(1)</a></dt>
|
|
<dd>
|
|
<p>Add or inspect object notes.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-pull.html">git-pull(1)</a></dt>
|
|
<dd>
|
|
<p>Fetch from and integrate with another repository or a local branch.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-push.html">git-push(1)</a></dt>
|
|
<dd>
|
|
<p>Update remote refs along with associated objects.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-range-diff.html">git-range-diff(1)</a></dt>
|
|
<dd>
|
|
<p>Compare two commit ranges (e.g. two versions of a branch).</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-rebase.html">git-rebase(1)</a></dt>
|
|
<dd>
|
|
<p>Reapply commits on top of another base tip.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-reset.html">git-reset(1)</a></dt>
|
|
<dd>
|
|
<p>Reset current HEAD to the specified state.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-restore.html">git-restore(1)</a></dt>
|
|
<dd>
|
|
<p>Restore working tree files.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-revert.html">git-revert(1)</a></dt>
|
|
<dd>
|
|
<p>Revert some existing commits.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-rm.html">git-rm(1)</a></dt>
|
|
<dd>
|
|
<p>Remove files from the working tree and from the index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-shortlog.html">git-shortlog(1)</a></dt>
|
|
<dd>
|
|
<p>Summarize <em>git log</em> output.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-show.html">git-show(1)</a></dt>
|
|
<dd>
|
|
<p>Show various types of objects.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-sparse-checkout.html">git-sparse-checkout(1)</a></dt>
|
|
<dd>
|
|
<p>Reduce your working tree to a subset of tracked files.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-stash.html">git-stash(1)</a></dt>
|
|
<dd>
|
|
<p>Stash the changes in a dirty working directory away.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-status.html">git-status(1)</a></dt>
|
|
<dd>
|
|
<p>Show the working tree status.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-submodule.html">git-submodule(1)</a></dt>
|
|
<dd>
|
|
<p>Initialize, update or inspect submodules.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-survey.html">git-survey(1)</a></dt>
|
|
<dd>
|
|
<p>EXPERIMENTAL: Measure various repository dimensions of scale.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-switch.html">git-switch(1)</a></dt>
|
|
<dd>
|
|
<p>Switch branches.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-tag.html">git-tag(1)</a></dt>
|
|
<dd>
|
|
<p>Create, list, delete or verify a tag object signed with GPG.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-worktree.html">git-worktree(1)</a></dt>
|
|
<dd>
|
|
<p>Manage multiple working trees.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitk.html">gitk(1)</a></dt>
|
|
<dd>
|
|
<p>The Git repository browser.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="scalar.html">scalar(1)</a></dt>
|
|
<dd>
|
|
<p>A tool for managing large Git repositories.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_ancillary_commands">Ancillary Commands</h3>
|
|
<div class="paragraph">
|
|
<p>Manipulators:</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-config.html">git-config(1)</a></dt>
|
|
<dd>
|
|
<p>Get and set repository or global options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-fast-export.html">git-fast-export(1)</a></dt>
|
|
<dd>
|
|
<p>Git data exporter.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-fast-import.html">git-fast-import(1)</a></dt>
|
|
<dd>
|
|
<p>Backend for fast Git data importers.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-filter-branch.html">git-filter-branch(1)</a></dt>
|
|
<dd>
|
|
<p>Rewrite branches.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-mergetool.html">git-mergetool(1)</a></dt>
|
|
<dd>
|
|
<p>Run merge conflict resolution tools to resolve merge conflicts.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-pack-refs.html">git-pack-refs(1)</a></dt>
|
|
<dd>
|
|
<p>Pack heads and tags for efficient repository access.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-prune.html">git-prune(1)</a></dt>
|
|
<dd>
|
|
<p>Prune all unreachable objects from the object database.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-reflog.html">git-reflog(1)</a></dt>
|
|
<dd>
|
|
<p>Manage reflog information.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-refs.html">git-refs(1)</a></dt>
|
|
<dd>
|
|
<p>Low-level access to refs.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-remote.html">git-remote(1)</a></dt>
|
|
<dd>
|
|
<p>Manage set of tracked repositories.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-repack.html">git-repack(1)</a></dt>
|
|
<dd>
|
|
<p>Pack unpacked objects in a repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-replace.html">git-replace(1)</a></dt>
|
|
<dd>
|
|
<p>Create, list, delete refs to replace objects.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Interrogators:</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-annotate.html">git-annotate(1)</a></dt>
|
|
<dd>
|
|
<p>Annotate file lines with commit information.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-blame.html">git-blame(1)</a></dt>
|
|
<dd>
|
|
<p>Show what revision and author last modified each line of a file.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-bugreport.html">git-bugreport(1)</a></dt>
|
|
<dd>
|
|
<p>Collect information for user to file a bug report.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-count-objects.html">git-count-objects(1)</a></dt>
|
|
<dd>
|
|
<p>Count unpacked number of objects and their disk consumption.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-diagnose.html">git-diagnose(1)</a></dt>
|
|
<dd>
|
|
<p>Generate a zip archive of diagnostic information.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-difftool.html">git-difftool(1)</a></dt>
|
|
<dd>
|
|
<p>Show changes using common diff tools.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-fsck.html">git-fsck(1)</a></dt>
|
|
<dd>
|
|
<p>Verifies the connectivity and validity of the objects in the database.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-help.html">git-help(1)</a></dt>
|
|
<dd>
|
|
<p>Display help information about Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-instaweb.html">git-instaweb(1)</a></dt>
|
|
<dd>
|
|
<p>Instantly browse your working repository in gitweb.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-merge-tree.html">git-merge-tree(1)</a></dt>
|
|
<dd>
|
|
<p>Perform merge without touching index or working tree.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-rerere.html">git-rerere(1)</a></dt>
|
|
<dd>
|
|
<p>Reuse recorded resolution of conflicted merges.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-show-branch.html">git-show-branch(1)</a></dt>
|
|
<dd>
|
|
<p>Show branches and their commits.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-verify-commit.html">git-verify-commit(1)</a></dt>
|
|
<dd>
|
|
<p>Check the GPG signature of commits.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-verify-tag.html">git-verify-tag(1)</a></dt>
|
|
<dd>
|
|
<p>Check the GPG signature of tags.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-version.html">git-version(1)</a></dt>
|
|
<dd>
|
|
<p>Display version information about Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-whatchanged.html">git-whatchanged(1)</a></dt>
|
|
<dd>
|
|
<p>Show logs with differences each commit introduces.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitweb.html">gitweb(1)</a></dt>
|
|
<dd>
|
|
<p>Git web interface (web frontend to Git repositories).</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_interacting_with_others">Interacting with Others</h3>
|
|
<div class="paragraph">
|
|
<p>These commands are to interact with foreign SCM and with other
|
|
people via patch over e-mail.</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-archimport.html">git-archimport(1)</a></dt>
|
|
<dd>
|
|
<p>Import a GNU Arch repository into Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-cvsexportcommit.html">git-cvsexportcommit(1)</a></dt>
|
|
<dd>
|
|
<p>Export a single commit to a CVS checkout.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-cvsimport.html">git-cvsimport(1)</a></dt>
|
|
<dd>
|
|
<p>Salvage your data out of another SCM people love to hate.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-cvsserver.html">git-cvsserver(1)</a></dt>
|
|
<dd>
|
|
<p>A CVS server emulator for Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-imap-send.html">git-imap-send(1)</a></dt>
|
|
<dd>
|
|
<p>Send a collection of patches from stdin to an IMAP folder.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-p4.html">git-p4(1)</a></dt>
|
|
<dd>
|
|
<p>Import from and submit to Perforce repositories.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-quiltimport.html">git-quiltimport(1)</a></dt>
|
|
<dd>
|
|
<p>Applies a quilt patchset onto the current branch.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-request-pull.html">git-request-pull(1)</a></dt>
|
|
<dd>
|
|
<p>Generates a summary of pending changes.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-send-email.html">git-send-email(1)</a></dt>
|
|
<dd>
|
|
<p>Send a collection of patches as emails.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-svn.html">git-svn(1)</a></dt>
|
|
<dd>
|
|
<p>Bidirectional operation between a Subversion repository and Git.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_reset_restore_and_revert">Reset, restore and revert</h3>
|
|
<div class="paragraph">
|
|
<p>There are three commands with similar names: <code>git</code> <code>reset</code>,
|
|
<code>git</code> <code>restore</code> and <code>git</code> <code>revert</code>.</p>
|
|
</div>
|
|
<div class="ulist">
|
|
<ul>
|
|
<li>
|
|
<p><a href="git-revert.html">git-revert(1)</a> is about making a new commit that reverts the
|
|
changes made by other commits.</p>
|
|
</li>
|
|
<li>
|
|
<p><a href="git-restore.html">git-restore(1)</a> is about restoring files in the working tree
|
|
from either the index or another commit. This command does not
|
|
update your branch. The command can also be used to restore files in
|
|
the index from another commit.</p>
|
|
</li>
|
|
<li>
|
|
<p><a href="git-reset.html">git-reset(1)</a> is about updating your branch, moving the tip
|
|
in order to add or remove commits from the branch. This operation
|
|
changes the commit history.</p>
|
|
<div class="paragraph">
|
|
<p><code>git</code> <code>reset</code> can also be used to restore the index, overlapping with
|
|
<code>git</code> <code>restore</code>.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_low_level_commands_plumbing">Low-level commands (plumbing)</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Although Git includes its
|
|
own porcelain layer, its low-level commands are sufficient to support
|
|
development of alternative porcelains. Developers of such porcelains
|
|
might start by reading about <a href="git-update-index.html">git-update-index(1)</a> and
|
|
<a href="git-read-tree.html">git-read-tree(1)</a>.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The interface (input, output, set of options and the semantics)
|
|
to these low-level commands are meant to be a lot more stable
|
|
than Porcelain level commands, because these commands are
|
|
primarily for scripted use. The interface to Porcelain commands
|
|
on the other hand are subject to change in order to improve the
|
|
end user experience.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The following description divides
|
|
the low-level commands into commands that manipulate objects (in
|
|
the repository, index, and working tree), commands that interrogate and
|
|
compare objects, and commands that move objects and references between
|
|
repositories.</p>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_manipulation_commands">Manipulation commands</h3>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-apply.html">git-apply(1)</a></dt>
|
|
<dd>
|
|
<p>Apply a patch to files and/or to the index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-checkout-index.html">git-checkout-index(1)</a></dt>
|
|
<dd>
|
|
<p>Copy files from the index to the working tree.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-commit-graph.html">git-commit-graph(1)</a></dt>
|
|
<dd>
|
|
<p>Write and verify Git commit-graph files.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-commit-tree.html">git-commit-tree(1)</a></dt>
|
|
<dd>
|
|
<p>Create a new commit object.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-hash-object.html">git-hash-object(1)</a></dt>
|
|
<dd>
|
|
<p>Compute object ID and optionally create an object from a file.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-index-pack.html">git-index-pack(1)</a></dt>
|
|
<dd>
|
|
<p>Build pack index file for an existing packed archive.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-merge-file.html">git-merge-file(1)</a></dt>
|
|
<dd>
|
|
<p>Run a three-way file merge.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-merge-index.html">git-merge-index(1)</a></dt>
|
|
<dd>
|
|
<p>Run a merge for files needing merging.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-mktag.html">git-mktag(1)</a></dt>
|
|
<dd>
|
|
<p>Creates a tag object with extra validation.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-mktree.html">git-mktree(1)</a></dt>
|
|
<dd>
|
|
<p>Build a tree-object from ls-tree formatted text.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-multi-pack-index.html">git-multi-pack-index(1)</a></dt>
|
|
<dd>
|
|
<p>Write and verify multi-pack-indexes.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-pack-objects.html">git-pack-objects(1)</a></dt>
|
|
<dd>
|
|
<p>Create a packed archive of objects.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-prune-packed.html">git-prune-packed(1)</a></dt>
|
|
<dd>
|
|
<p>Remove extra objects that are already in pack files.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-read-tree.html">git-read-tree(1)</a></dt>
|
|
<dd>
|
|
<p>Reads tree information into the index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-replay.html">git-replay(1)</a></dt>
|
|
<dd>
|
|
<p>EXPERIMENTAL: Replay commits on a new base, works with bare repos too.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-symbolic-ref.html">git-symbolic-ref(1)</a></dt>
|
|
<dd>
|
|
<p>Read, modify and delete symbolic refs.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-unpack-objects.html">git-unpack-objects(1)</a></dt>
|
|
<dd>
|
|
<p>Unpack objects from a packed archive.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-update-index.html">git-update-index(1)</a></dt>
|
|
<dd>
|
|
<p>Register file contents in the working tree to the index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-update-ref.html">git-update-ref(1)</a></dt>
|
|
<dd>
|
|
<p>Update the object name stored in a ref safely.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-write-tree.html">git-write-tree(1)</a></dt>
|
|
<dd>
|
|
<p>Create a tree object from the current index.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_interrogation_commands">Interrogation commands</h3>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-cat-file.html">git-cat-file(1)</a></dt>
|
|
<dd>
|
|
<p>Provide contents or details of repository objects.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-cherry.html">git-cherry(1)</a></dt>
|
|
<dd>
|
|
<p>Find commits yet to be applied to upstream.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-diff-files.html">git-diff-files(1)</a></dt>
|
|
<dd>
|
|
<p>Compares files in the working tree and the index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-diff-index.html">git-diff-index(1)</a></dt>
|
|
<dd>
|
|
<p>Compare a tree to the working tree or index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-diff-tree.html">git-diff-tree(1)</a></dt>
|
|
<dd>
|
|
<p>Compares the content and mode of blobs found via two tree objects.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-for-each-ref.html">git-for-each-ref(1)</a></dt>
|
|
<dd>
|
|
<p>Output information on each ref.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-for-each-repo.html">git-for-each-repo(1)</a></dt>
|
|
<dd>
|
|
<p>Run a Git command on a list of repositories.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-get-tar-commit-id.html">git-get-tar-commit-id(1)</a></dt>
|
|
<dd>
|
|
<p>Extract commit ID from an archive created using git-archive.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-ls-files.html">git-ls-files(1)</a></dt>
|
|
<dd>
|
|
<p>Show information about files in the index and the working tree.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-ls-remote.html">git-ls-remote(1)</a></dt>
|
|
<dd>
|
|
<p>List references in a remote repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-ls-tree.html">git-ls-tree(1)</a></dt>
|
|
<dd>
|
|
<p>List the contents of a tree object.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-merge-base.html">git-merge-base(1)</a></dt>
|
|
<dd>
|
|
<p>Find as good common ancestors as possible for a merge.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-name-rev.html">git-name-rev(1)</a></dt>
|
|
<dd>
|
|
<p>Find symbolic names for given revs.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-pack-redundant.html">git-pack-redundant(1)</a></dt>
|
|
<dd>
|
|
<p>Find redundant pack files.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-rev-list.html">git-rev-list(1)</a></dt>
|
|
<dd>
|
|
<p>Lists commit objects in reverse chronological order.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-rev-parse.html">git-rev-parse(1)</a></dt>
|
|
<dd>
|
|
<p>Pick out and massage parameters.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-show-index.html">git-show-index(1)</a></dt>
|
|
<dd>
|
|
<p>Show packed archive index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-show-ref.html">git-show-ref(1)</a></dt>
|
|
<dd>
|
|
<p>List references in a local repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-unpack-file.html">git-unpack-file(1)</a></dt>
|
|
<dd>
|
|
<p>Creates a temporary file with a blob’s contents.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-var.html">git-var(1)</a></dt>
|
|
<dd>
|
|
<p>Show a Git logical variable.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-verify-pack.html">git-verify-pack(1)</a></dt>
|
|
<dd>
|
|
<p>Validate packed Git archive files.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>In general, the interrogate commands do not touch the files in
|
|
the working tree.</p>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_syncing_repositories">Syncing repositories</h3>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-daemon.html">git-daemon(1)</a></dt>
|
|
<dd>
|
|
<p>A really simple server for Git repositories.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-fetch-pack.html">git-fetch-pack(1)</a></dt>
|
|
<dd>
|
|
<p>Receive missing objects from another repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-http-backend.html">git-http-backend(1)</a></dt>
|
|
<dd>
|
|
<p>Server side implementation of Git over HTTP.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-send-pack.html">git-send-pack(1)</a></dt>
|
|
<dd>
|
|
<p>Push objects over Git protocol to another repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-update-server-info.html">git-update-server-info(1)</a></dt>
|
|
<dd>
|
|
<p>Update auxiliary info file to help dumb servers.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The following are helper commands used by the above; end users
|
|
typically do not use them directly.</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-http-fetch.html">git-http-fetch(1)</a></dt>
|
|
<dd>
|
|
<p>Download from a remote Git repository via HTTP.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-http-push.html">git-http-push(1)</a></dt>
|
|
<dd>
|
|
<p>Push objects over HTTP/DAV to another repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-receive-pack.html">git-receive-pack(1)</a></dt>
|
|
<dd>
|
|
<p>Receive what is pushed into the repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-shell.html">git-shell(1)</a></dt>
|
|
<dd>
|
|
<p>Restricted login shell for Git-only SSH access.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-upload-archive.html">git-upload-archive(1)</a></dt>
|
|
<dd>
|
|
<p>Send archive back to git-archive.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-upload-pack.html">git-upload-pack(1)</a></dt>
|
|
<dd>
|
|
<p>Send objects packed back to git-fetch-pack.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_internal_helper_commands">Internal helper commands</h3>
|
|
<div class="paragraph">
|
|
<p>These are internal helper commands used by other commands; end
|
|
users typically do not use them directly.</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="git-check-attr.html">git-check-attr(1)</a></dt>
|
|
<dd>
|
|
<p>Display gitattributes information.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-check-ignore.html">git-check-ignore(1)</a></dt>
|
|
<dd>
|
|
<p>Debug gitignore / exclude files.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-check-mailmap.html">git-check-mailmap(1)</a></dt>
|
|
<dd>
|
|
<p>Show canonical names and email addresses of contacts.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-check-ref-format.html">git-check-ref-format(1)</a></dt>
|
|
<dd>
|
|
<p>Ensures that a reference name is well formed.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-column.html">git-column(1)</a></dt>
|
|
<dd>
|
|
<p>Display data in columns.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-credential.html">git-credential(1)</a></dt>
|
|
<dd>
|
|
<p>Retrieve and store user credentials.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-credential-cache.html">git-credential-cache(1)</a></dt>
|
|
<dd>
|
|
<p>Helper to temporarily store passwords in memory.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-credential-store.html">git-credential-store(1)</a></dt>
|
|
<dd>
|
|
<p>Helper to store credentials on disk.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a></dt>
|
|
<dd>
|
|
<p>Produce a merge commit message.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-hook.html">git-hook(1)</a></dt>
|
|
<dd>
|
|
<p>Run git hooks.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-interpret-trailers.html">git-interpret-trailers(1)</a></dt>
|
|
<dd>
|
|
<p>Add or parse structured information in commit messages.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-mailinfo.html">git-mailinfo(1)</a></dt>
|
|
<dd>
|
|
<p>Extracts patch and authorship from a single e-mail message.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-mailsplit.html">git-mailsplit(1)</a></dt>
|
|
<dd>
|
|
<p>Simple UNIX mbox splitter program.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-merge-one-file.html">git-merge-one-file(1)</a></dt>
|
|
<dd>
|
|
<p>The standard helper program to use with git-merge-index.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-patch-id.html">git-patch-id(1)</a></dt>
|
|
<dd>
|
|
<p>Compute unique ID for a patch.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-sh-i18n.html">git-sh-i18n(1)</a></dt>
|
|
<dd>
|
|
<p>Git’s i18n setup code for shell scripts.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-sh-setup.html">git-sh-setup(1)</a></dt>
|
|
<dd>
|
|
<p>Common Git shell script setup code.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="git-stripspace.html">git-stripspace(1)</a></dt>
|
|
<dd>
|
|
<p>Remove unnecessary whitespace.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_guides">Guides</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>The following documentation pages are guides about Git concepts.</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="gitcore-tutorial.html">gitcore-tutorial(7)</a></dt>
|
|
<dd>
|
|
<p>A Git core tutorial for developers.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitcredentials.html">gitcredentials(7)</a></dt>
|
|
<dd>
|
|
<p>Providing usernames and passwords to Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitcvs-migration.html">gitcvs-migration(7)</a></dt>
|
|
<dd>
|
|
<p>Git for CVS users.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitdiffcore.html">gitdiffcore(7)</a></dt>
|
|
<dd>
|
|
<p>Tweaking diff output.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="giteveryday.html">giteveryday(7)</a></dt>
|
|
<dd>
|
|
<p>A useful minimum set of commands for Everyday Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitfaq.html">gitfaq(7)</a></dt>
|
|
<dd>
|
|
<p>Frequently asked questions about using Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitglossary.html">gitglossary(7)</a></dt>
|
|
<dd>
|
|
<p>A Git Glossary.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitnamespaces.html">gitnamespaces(7)</a></dt>
|
|
<dd>
|
|
<p>Git namespaces.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitremote-helpers.html">gitremote-helpers(7)</a></dt>
|
|
<dd>
|
|
<p>Helper programs to interact with remote repositories.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitsubmodules.html">gitsubmodules(7)</a></dt>
|
|
<dd>
|
|
<p>Mounting one repository inside another.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gittutorial.html">gittutorial(7)</a></dt>
|
|
<dd>
|
|
<p>A tutorial introduction to Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gittutorial-2.html">gittutorial-2(7)</a></dt>
|
|
<dd>
|
|
<p>A tutorial introduction to Git: part two.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitworkflows.html">gitworkflows(7)</a></dt>
|
|
<dd>
|
|
<p>An overview of recommended workflows with Git.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_repository_command_and_file_interfaces">Repository, command and file interfaces</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>This documentation discusses repository and command interfaces which
|
|
users are expected to interact with directly. See <code>--user-formats</code> in
|
|
<a href="git-help.html">git-help(1)</a> for more details on the criteria.</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="gitattributes.html">gitattributes(5)</a></dt>
|
|
<dd>
|
|
<p>Defining attributes per path.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitcli.html">gitcli(7)</a></dt>
|
|
<dd>
|
|
<p>Git command-line interface and conventions.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="githooks.html">githooks(5)</a></dt>
|
|
<dd>
|
|
<p>Hooks used by Git.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitignore.html">gitignore(5)</a></dt>
|
|
<dd>
|
|
<p>Specifies intentionally untracked files to ignore.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitmailmap.html">gitmailmap(5)</a></dt>
|
|
<dd>
|
|
<p>Map author/committer names and/or E-Mail addresses.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitmodules.html">gitmodules(5)</a></dt>
|
|
<dd>
|
|
<p>Defining submodule properties.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitrepository-layout.html">gitrepository-layout(5)</a></dt>
|
|
<dd>
|
|
<p>Git Repository Layout.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitrevisions.html">gitrevisions(7)</a></dt>
|
|
<dd>
|
|
<p>Specifying revisions and ranges for Git.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_file_formats_protocols_and_other_developer_interfaces">File formats, protocols and other developer interfaces</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>This documentation discusses file formats, over-the-wire protocols and
|
|
other git developer interfaces. See <code>--developer-interfaces</code> in
|
|
<a href="git-help.html">git-help(1)</a>.</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><a href="gitformat-bundle.html">gitformat-bundle(5)</a></dt>
|
|
<dd>
|
|
<p>The bundle file format.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitformat-chunk.html">gitformat-chunk(5)</a></dt>
|
|
<dd>
|
|
<p>Chunk-based file formats.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitformat-commit-graph.html">gitformat-commit-graph(5)</a></dt>
|
|
<dd>
|
|
<p>Git commit-graph format.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitformat-index.html">gitformat-index(5)</a></dt>
|
|
<dd>
|
|
<p>Git index format.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitformat-pack.html">gitformat-pack(5)</a></dt>
|
|
<dd>
|
|
<p>Git pack format.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitformat-signature.html">gitformat-signature(5)</a></dt>
|
|
<dd>
|
|
<p>Git cryptographic signature formats.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitprotocol-capabilities.html">gitprotocol-capabilities(5)</a></dt>
|
|
<dd>
|
|
<p>Protocol v0 and v1 capabilities.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitprotocol-common.html">gitprotocol-common(5)</a></dt>
|
|
<dd>
|
|
<p>Things common to various protocols.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitprotocol-http.html">gitprotocol-http(5)</a></dt>
|
|
<dd>
|
|
<p>Git HTTP-based protocols.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitprotocol-pack.html">gitprotocol-pack(5)</a></dt>
|
|
<dd>
|
|
<p>How packs are transferred over-the-wire.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><a href="gitprotocol-v2.html">gitprotocol-v2(5)</a></dt>
|
|
<dd>
|
|
<p>Git Wire Protocol, Version 2.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_configuration_mechanism">Configuration Mechanism</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Git uses a simple text format to store customizations that are per
|
|
repository and are per user. Such a configuration file may look
|
|
like this:</p>
|
|
</div>
|
|
<div class="listingblock">
|
|
<div class="content">
|
|
<pre>#
|
|
# A '#' or ';' character indicates a comment.
|
|
#
|
|
|
|
; core variables
|
|
[core]
|
|
; Don't trust file modes
|
|
filemode = false
|
|
|
|
; user identity
|
|
[user]
|
|
name = "Junio C Hamano"
|
|
email = "gitster@pobox.com"</pre>
|
|
</div>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Various commands read from the configuration file and adjust
|
|
their operation accordingly. See <a href="git-config.html">git-config(1)</a> for a
|
|
list and more details about the configuration mechanism.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_identifier_terminology">Identifier Terminology</h2>
|
|
<div class="sectionbody">
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><object></dt>
|
|
<dd>
|
|
<p>Indicates the object name for any type of object.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><blob></dt>
|
|
<dd>
|
|
<p>Indicates a blob object name.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><tree></dt>
|
|
<dd>
|
|
<p>Indicates a tree object name.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><commit></dt>
|
|
<dd>
|
|
<p>Indicates a commit object name.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><tree-ish></dt>
|
|
<dd>
|
|
<p>Indicates a tree, commit or tag object name. A
|
|
command that takes a <tree-ish> argument ultimately wants to
|
|
operate on a <tree> object but automatically dereferences
|
|
<commit> and <tag> objects that point at a <tree>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><commit-ish></dt>
|
|
<dd>
|
|
<p>Indicates a commit or tag object name. A
|
|
command that takes a <commit-ish> argument ultimately wants to
|
|
operate on a <commit> object but automatically dereferences
|
|
<tag> objects that point at a <commit>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><type></dt>
|
|
<dd>
|
|
<p>Indicates that an object type is required.
|
|
Currently one of: <code>blob</code>, <code>tree</code>, <code>commit</code>, or <code>tag</code>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><file></dt>
|
|
<dd>
|
|
<p>Indicates a filename - almost always relative to the
|
|
root of the tree structure <code>GIT_INDEX_FILE</code> describes.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_symbolic_identifiers">Symbolic Identifiers</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Any Git command accepting any <object> can also use the following
|
|
symbolic notation:</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1">HEAD</dt>
|
|
<dd>
|
|
<p>indicates the head of the current branch.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><tag></dt>
|
|
<dd>
|
|
<p>a valid tag <em>name</em>
|
|
(i.e. a <code>refs/tags/</code><em><tag></em> reference).</p>
|
|
</dd>
|
|
<dt class="hdlist1"><head></dt>
|
|
<dd>
|
|
<p>a valid head <em>name</em>
|
|
(i.e. a <code>refs/heads/</code><em><head></em> reference).</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>For a more complete list of ways to spell object names, see
|
|
"SPECIFYING REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_filedirectory_structure">File/Directory Structure</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Please see the <a href="gitrepository-layout.html">gitrepository-layout(5)</a> document.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Read <a href="githooks.html">githooks(5)</a> for more details about each hook.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Higher level SCMs may provide and manage additional information in the
|
|
<code>$GIT_DIR</code>.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_terminology">Terminology</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Please see <a href="gitglossary.html">gitglossary(7)</a>.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_environment_variables">Environment Variables</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Various Git commands pay attention to environment variables and change
|
|
their behavior. The environment variables marked as "Boolean" take
|
|
their values the same way as Boolean valued configuration variables, i.e.,
|
|
"true", "yes", "on" and positive numbers are taken as "yes", while "false",
|
|
"no", "off", and "0" are taken as "no".</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Here are the variables:</p>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_system">System</h3>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><code>HOME</code></dt>
|
|
<dd>
|
|
<p>Specifies the path to the user’s home directory. On Windows, if
|
|
unset, Git will set a process environment variable equal to:
|
|
<code>$HOMEDRIVE$HOMEPATH</code> if both <code>$HOMEDRIVE</code> and <code>$HOMEPATH</code> exist;
|
|
otherwise <code>$USERPROFILE</code> if <code>$USERPROFILE</code> exists.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_the_git_repository">The Git Repository</h3>
|
|
<div class="paragraph">
|
|
<p>These environment variables apply to <em>all</em> core Git commands. Nb: it
|
|
is worth noting that they may be used/overridden by SCMS sitting above
|
|
Git so take care if using a foreign front-end.</p>
|
|
</div>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><code>GIT_INDEX_FILE</code></dt>
|
|
<dd>
|
|
<p>This environment variable specifies an alternate
|
|
index file. If not specified, the default of <code>$GIT_DIR/index</code>
|
|
is used.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_INDEX_VERSION</code></dt>
|
|
<dd>
|
|
<p>This environment variable specifies what index version is used
|
|
when writing the index file out. It won’t affect existing index
|
|
files. By default index file version 2 or 3 is used. See
|
|
<a href="git-update-index.html">git-update-index(1)</a> for more information.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_OBJECT_DIRECTORY</code></dt>
|
|
<dd>
|
|
<p>If the object storage directory is specified via this
|
|
environment variable then the sha1 directories are created
|
|
underneath - otherwise the default <code>$GIT_DIR/objects</code>
|
|
directory is used.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_ALTERNATE_OBJECT_DIRECTORIES</code></dt>
|
|
<dd>
|
|
<p>Due to the immutable nature of Git objects, old objects can be
|
|
archived into shared, read-only directories. This variable
|
|
specifies a ":" separated (on Windows ";" separated) list
|
|
of Git object directories which can be used to search for Git
|
|
objects. New objects will not be written to these directories.</p>
|
|
<div class="paragraph">
|
|
<p>Entries that begin with " (double-quote) will be interpreted
|
|
as C-style quoted paths, removing leading and trailing
|
|
double-quotes and respecting backslash escapes. E.g., the value
|
|
"path-with-\"-and-:-in-it":vanilla-path has two paths:
|
|
<code>path-with-</code>"-and-:-in-it and <code>vanilla-path</code>.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_DIR</code></dt>
|
|
<dd>
|
|
<p>If the <code>GIT_DIR</code> environment variable is set then it
|
|
specifies a path to use instead of the default .<code>git</code>
|
|
for the base of the repository.
|
|
The <code>--git-dir</code> command-line option also sets this value.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_WORK_TREE</code></dt>
|
|
<dd>
|
|
<p>Set the path to the root of the working tree.
|
|
This can also be controlled by the <code>--work-tree</code> command-line
|
|
option and the core.worktree configuration variable.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_NAMESPACE</code></dt>
|
|
<dd>
|
|
<p>Set the Git namespace; see <a href="gitnamespaces.html">gitnamespaces(7)</a> for details.
|
|
The <code>--namespace</code> command-line option also sets this value.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_CEILING_DIRECTORIES</code></dt>
|
|
<dd>
|
|
<p>This should be a colon-separated list of absolute paths. If
|
|
set, it is a list of directories that Git should not chdir up
|
|
into while looking for a repository directory (useful for
|
|
excluding slow-loading network directories). It will not
|
|
exclude the current working directory or a GIT_DIR set on the
|
|
command line or in the environment. Normally, Git has to read
|
|
the entries in this list and resolve any symlink that
|
|
might be present in order to compare them with the current
|
|
directory. However, if even this access is slow, you
|
|
can add an empty entry to the list to tell Git that the
|
|
subsequent entries are not symlinks and needn’t be resolved;
|
|
e.g.,
|
|
<code>GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink</code>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_DISCOVERY_ACROSS_FILESYSTEM</code></dt>
|
|
<dd>
|
|
<p>When run in a directory that does not have ".git" repository
|
|
directory, Git tries to find such a directory in the parent
|
|
directories to find the top of the working tree, but by default it
|
|
does not cross filesystem boundaries. This Boolean environment variable
|
|
can be set to true to tell Git not to stop at filesystem
|
|
boundaries. Like <code>GIT_CEILING_DIRECTORIES</code>, this will not affect
|
|
an explicit repository directory set via <code>GIT_DIR</code> or on the
|
|
command line.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_COMMON_DIR</code></dt>
|
|
<dd>
|
|
<p>If this variable is set to a path, non-worktree files that are
|
|
normally in $GIT_DIR will be taken from this path
|
|
instead. Worktree-specific files such as HEAD or index are
|
|
taken from $GIT_DIR. See <a href="gitrepository-layout.html">gitrepository-layout(5)</a> and
|
|
<a href="git-worktree.html">git-worktree(1)</a> for
|
|
details. This variable has lower precedence than other path
|
|
variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY…​</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_DEFAULT_HASH</code></dt>
|
|
<dd>
|
|
<p>If this variable is set, the default hash algorithm for new
|
|
repositories will be set to this value. This value is
|
|
ignored when cloning and the setting of the remote repository
|
|
is always used. The default is "sha1".
|
|
See <code>--object-format</code> in <a href="git-init.html">git-init(1)</a>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_DEFAULT_REF_FORMAT</code></dt>
|
|
<dd>
|
|
<p>If this variable is set, the default reference backend format for new
|
|
repositories will be set to this value. The default is "files".
|
|
See <code>--ref-format</code> in <a href="git-init.html">git-init(1)</a>.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_git_commits">Git Commits</h3>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><code>GIT_AUTHOR_NAME</code></dt>
|
|
<dd>
|
|
<p>The human-readable name used in the author identity when creating commit or
|
|
tag objects, or when writing reflogs. Overrides the <code>user.name</code> and
|
|
<code>author.name</code> configuration settings.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_AUTHOR_EMAIL</code></dt>
|
|
<dd>
|
|
<p>The email address used in the author identity when creating commit or
|
|
tag objects, or when writing reflogs. Overrides the <code>user.email</code> and
|
|
<code>author.email</code> configuration settings.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_AUTHOR_DATE</code></dt>
|
|
<dd>
|
|
<p>The date used for the author identity when creating commit or tag objects, or
|
|
when writing reflogs. See <a href="git-commit.html">git-commit(1)</a> for valid formats.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_COMMITTER_NAME</code></dt>
|
|
<dd>
|
|
<p>The human-readable name used in the committer identity when creating commit or
|
|
tag objects, or when writing reflogs. Overrides the <code>user.name</code> and
|
|
<code>committer.name</code> configuration settings.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_COMMITTER_EMAIL</code></dt>
|
|
<dd>
|
|
<p>The email address used in the author identity when creating commit or
|
|
tag objects, or when writing reflogs. Overrides the <code>user.email</code> and
|
|
<code>committer.email</code> configuration settings.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_COMMITTER_DATE</code></dt>
|
|
<dd>
|
|
<p>The date used for the committer identity when creating commit or tag objects, or
|
|
when writing reflogs. See <a href="git-commit.html">git-commit(1)</a> for valid formats.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>EMAIL</code></dt>
|
|
<dd>
|
|
<p>The email address used in the author and committer identities if no other
|
|
relevant environment variable or configuration setting has been set.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_git_diffs">Git Diffs</h3>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><code>GIT_DIFF_OPTS</code></dt>
|
|
<dd>
|
|
<p>Only valid setting is "--unified=??" or "-u??" to set the
|
|
number of context lines shown when a unified diff is created.
|
|
This takes precedence over any "-U" or "--unified" option
|
|
value passed on the Git diff command line.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_EXTERNAL_DIFF</code></dt>
|
|
<dd>
|
|
<p>When the environment variable <code>GIT_EXTERNAL_DIFF</code> is set, the
|
|
program named by it is called to generate diffs, and Git
|
|
does not use its builtin diff machinery.
|
|
For a path that is added, removed, or modified,
|
|
<code>GIT_EXTERNAL_DIFF</code> is called with 7 parameters:</p>
|
|
<div class="literalblock">
|
|
<div class="content">
|
|
<pre>path old-file old-hex old-mode new-file new-hex new-mode</pre>
|
|
</div>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>where:</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><old|new>-file</dt>
|
|
<dd>
|
|
<p>are files GIT_EXTERNAL_DIFF can use to read the
|
|
contents of <old|new>,</p>
|
|
</dd>
|
|
<dt class="hdlist1"><old|new>-hex</dt>
|
|
<dd>
|
|
<p>are the 40-hexdigit SHA-1 hashes,</p>
|
|
</dd>
|
|
<dt class="hdlist1"><old|new>-mode</dt>
|
|
<dd>
|
|
<p>are the octal representation of the file modes.</p>
|
|
<div class="paragraph">
|
|
<p>The file parameters can point at the user’s working file
|
|
(e.g. <code>new-file</code> in "git-diff-files"), <code>/dev/null</code> (e.g. <code>old-file</code>
|
|
when a new file is added), or a temporary file (e.g. <code>old-file</code> in the
|
|
index). <code>GIT_EXTERNAL_DIFF</code> should not worry about unlinking the
|
|
temporary file — it is removed when <code>GIT_EXTERNAL_DIFF</code> exits.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>For a path that is unmerged, <code>GIT_EXTERNAL_DIFF</code> is called with 1
|
|
parameter, <path>.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>For each path <code>GIT_EXTERNAL_DIFF</code> is called, two environment variables,
|
|
<code>GIT_DIFF_PATH_COUNTER</code> and <code>GIT_DIFF_PATH_TOTAL</code> are set.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_EXTERNAL_DIFF_TRUST_EXIT_CODE</code></dt>
|
|
<dd>
|
|
<p>If this Boolean environment variable is set to true then the
|
|
<code>GIT_EXTERNAL_DIFF</code> command is expected to return exit code
|
|
0 if it considers the input files to be equal or 1 if it
|
|
considers them to be different, like <code>diff</code>(<code>1</code>).
|
|
If it is set to false, which is the default, then the command
|
|
is expected to return exit code 0 regardless of equality.
|
|
Any other exit code causes Git to report a fatal error.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_DIFF_PATH_COUNTER</code></dt>
|
|
<dd>
|
|
<p>A 1-based counter incremented by one for every path.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_DIFF_PATH_TOTAL</code></dt>
|
|
<dd>
|
|
<p>The total number of paths.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
<div class="sect2">
|
|
<h3 id="_other">other</h3>
|
|
<div class="dlist">
|
|
<dl>
|
|
<dt class="hdlist1"><code>GIT_MERGE_VERBOSITY</code></dt>
|
|
<dd>
|
|
<p>A number controlling the amount of output shown by
|
|
the recursive merge strategy. Overrides merge.verbosity.
|
|
See <a href="git-merge.html">git-merge(1)</a></p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_PAGER</code></dt>
|
|
<dd>
|
|
<p>This environment variable overrides <code>$PAGER</code>. If it is set
|
|
to an empty string or to the value "cat", Git will not launch
|
|
a pager. See also the <code>core.pager</code> option in
|
|
<a href="git-config.html">git-config(1)</a>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_PROGRESS_DELAY</code></dt>
|
|
<dd>
|
|
<p>A number controlling how many seconds to delay before showing
|
|
optional progress indicators. Defaults to 2.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_EDITOR</code></dt>
|
|
<dd>
|
|
<p>This environment variable overrides <code>$EDITOR</code> and <code>$VISUAL</code>.
|
|
It is used by several Git commands when, on interactive mode,
|
|
an editor is to be launched. See also <a href="git-var.html">git-var(1)</a>
|
|
and the <code>core.editor</code> option in <a href="git-config.html">git-config(1)</a>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_SEQUENCE_EDITOR</code></dt>
|
|
<dd>
|
|
<p>This environment variable overrides the configured Git editor
|
|
when editing the todo list of an interactive rebase. See also
|
|
<a href="git-rebase.html">git-rebase(1)</a> and the <code>sequence.editor</code> option in
|
|
<a href="git-config.html">git-config(1)</a>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_SSH</code></dt>
|
|
<dt class="hdlist1"><code>GIT_SSH_COMMAND</code></dt>
|
|
<dd>
|
|
<p>If either of these environment variables is set then <em>git fetch</em>
|
|
and <em>git push</em> will use the specified command instead of <em>ssh</em>
|
|
when they need to connect to a remote system.
|
|
The command-line parameters passed to the configured command are
|
|
determined by the ssh variant. See <code>ssh.variant</code> option in
|
|
<a href="git-config.html">git-config(1)</a> for details.</p>
|
|
<div class="paragraph">
|
|
<p><code>$GIT_SSH_COMMAND</code> takes precedence over <code>$GIT_SSH</code>, and is interpreted
|
|
by the shell, which allows additional arguments to be included.
|
|
<code>$GIT_SSH</code> on the other hand must be just the path to a program
|
|
(which can be a wrapper shell script, if additional arguments are
|
|
needed).</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Usually it is easier to configure any desired options through your
|
|
personal .<code>ssh/config</code> file. Please consult your ssh documentation
|
|
for further details.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_SSH_VARIANT</code></dt>
|
|
<dd>
|
|
<p>If this environment variable is set, it overrides Git’s autodetection
|
|
whether <code>GIT_SSH</code>/<code>GIT_SSH_COMMAND</code>/<code>core.sshCommand</code> refer to OpenSSH,
|
|
plink or tortoiseplink. This variable overrides the config setting
|
|
<code>ssh.variant</code> that serves the same purpose.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_SSL_NO_VERIFY</code></dt>
|
|
<dd>
|
|
<p>Setting and exporting this environment variable to any value
|
|
tells Git not to verify the SSL certificate when fetching or
|
|
pushing over HTTPS.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_ATTR_SOURCE</code></dt>
|
|
<dd>
|
|
<p>Sets the treeish that gitattributes will be read from.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_ASKPASS</code></dt>
|
|
<dd>
|
|
<p>If this environment variable is set, then Git commands which need to
|
|
acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
|
|
will call this program with a suitable prompt as command-line argument
|
|
and read the password from its STDOUT. See also the <code>core.askPass</code>
|
|
option in <a href="git-config.html">git-config(1)</a>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TERMINAL_PROMPT</code></dt>
|
|
<dd>
|
|
<p>If this Boolean environment variable is set to false, git will not prompt
|
|
on the terminal (e.g., when asking for HTTP authentication).</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_CONFIG_GLOBAL</code></dt>
|
|
<dt class="hdlist1"><code>GIT_CONFIG_SYSTEM</code></dt>
|
|
<dd>
|
|
<p>Take the configuration from the given files instead from global or
|
|
system-level configuration files. If <code>GIT_CONFIG_SYSTEM</code> is set, the
|
|
system config file defined at build time (usually <code>/etc/gitconfig</code>)
|
|
will not be read. Likewise, if <code>GIT_CONFIG_GLOBAL</code> is set, neither
|
|
<code>$HOME/.gitconfig</code> nor <code>$XDG_CONFIG_HOME/git/config</code> will be read. Can
|
|
be set to <code>/dev/null</code> to skip reading configuration files of the
|
|
respective level.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_CONFIG_NOSYSTEM</code></dt>
|
|
<dd>
|
|
<p>Whether to skip reading settings from the system-wide
|
|
<code>$</code>(<code>prefix</code>)<code>/etc/gitconfig</code> file. This Boolean environment variable can
|
|
be used along with <code>$HOME</code> and <code>$XDG_CONFIG_HOME</code> to create a
|
|
predictable environment for a picky script, or you can set it
|
|
to true to temporarily avoid using a buggy <code>/etc/gitconfig</code> file while
|
|
waiting for someone with sufficient permissions to fix it.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_FLUSH</code></dt>
|
|
<dd>
|
|
<p>If this Boolean environment variable is set to true, then commands such
|
|
as <em>git blame</em> (in incremental mode), <em>git rev-list</em>, <em>git log</em>,
|
|
<em>git check-attr</em> and <em>git check-ignore</em> will
|
|
force a flush of the output stream after each record have been
|
|
flushed. If this
|
|
variable is set to false, the output of these commands will be done
|
|
using completely buffered I/O. If this environment variable is
|
|
not set, Git will choose buffered or record-oriented flushing
|
|
based on whether stdout appears to be redirected to a file or not.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE</code></dt>
|
|
<dd>
|
|
<p>Enables general trace messages, e.g. alias expansion, built-in
|
|
command execution and external command execution.</p>
|
|
<div class="paragraph">
|
|
<p>If this variable is set to "1", "2" or "true" (comparison
|
|
is case insensitive), trace messages will be printed to
|
|
stderr.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>If the variable is set to an integer value greater than 2
|
|
and lower than 10 (strictly) then Git will interpret this
|
|
value as an open file descriptor and will try to write the
|
|
trace messages into this file descriptor.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Alternatively, if the variable is set to an absolute path
|
|
(starting with a <em>/</em> character), Git will interpret this
|
|
as a file path and will try to append the trace messages
|
|
to it.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Unsetting the variable, or setting it to empty, "0" or
|
|
"false" (case insensitive) disables trace messages.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_FSMONITOR</code></dt>
|
|
<dd>
|
|
<p>Enables trace messages for the filesystem monitor extension.
|
|
See <code>GIT_TRACE</code> for available trace output options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_PACK_ACCESS</code></dt>
|
|
<dd>
|
|
<p>Enables trace messages for all accesses to any packs. For each
|
|
access, the pack file name and an offset in the pack is
|
|
recorded. This may be helpful for troubleshooting some
|
|
pack-related performance problems.
|
|
See <code>GIT_TRACE</code> for available trace output options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_PACKET</code></dt>
|
|
<dd>
|
|
<p>Enables trace messages for all packets coming in or out of a
|
|
given program. This can help with debugging object negotiation
|
|
or other protocol issues. Tracing is turned off at a packet
|
|
starting with "PACK" (but see <code>GIT_TRACE_PACKFILE</code> below).
|
|
See <code>GIT_TRACE</code> for available trace output options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_PACKFILE</code></dt>
|
|
<dd>
|
|
<p>Enables tracing of packfiles sent or received by a
|
|
given program. Unlike other trace output, this trace is
|
|
verbatim: no headers, and no quoting of binary data. You almost
|
|
certainly want to direct into a file (e.g.,
|
|
<code>GIT_TRACE_PACKFILE=/tmp/my.pack</code>) rather than displaying it on
|
|
the terminal or mixing it with other trace output.</p>
|
|
<div class="paragraph">
|
|
<p>Note that this is currently only implemented for the client side
|
|
of clones and fetches.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_PERFORMANCE</code></dt>
|
|
<dd>
|
|
<p>Enables performance related trace messages, e.g. total execution
|
|
time of each Git command.
|
|
See <code>GIT_TRACE</code> for available trace output options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_REFS</code></dt>
|
|
<dd>
|
|
<p>Enables trace messages for operations on the ref database.
|
|
See <code>GIT_TRACE</code> for available trace output options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_SETUP</code></dt>
|
|
<dd>
|
|
<p>Enables trace messages printing the .git, working tree and current
|
|
working directory after Git has completed its setup phase.
|
|
See <code>GIT_TRACE</code> for available trace output options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_SHALLOW</code></dt>
|
|
<dd>
|
|
<p>Enables trace messages that can help debugging fetching /
|
|
cloning of shallow repositories.
|
|
See <code>GIT_TRACE</code> for available trace output options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_CURL</code></dt>
|
|
<dd>
|
|
<p>Enables a curl full trace dump of all incoming and outgoing data,
|
|
including descriptive information, of the git transport protocol.
|
|
This is similar to doing curl <code>--trace-ascii</code> on the command line.
|
|
See <code>GIT_TRACE</code> for available trace output options.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_CURL_NO_DATA</code></dt>
|
|
<dd>
|
|
<p>When a curl trace is enabled (see <code>GIT_TRACE_CURL</code> above), do not dump
|
|
data (that is, only dump info lines and headers).</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE2</code></dt>
|
|
<dd>
|
|
<p>Enables more detailed trace messages from the "trace2" library.
|
|
Output from <code>GIT_TRACE2</code> is a simple text-based format for human
|
|
readability.</p>
|
|
<div class="paragraph">
|
|
<p>If this variable is set to "1", "2" or "true" (comparison
|
|
is case insensitive), trace messages will be printed to
|
|
stderr.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>If the variable is set to an integer value greater than 2
|
|
and lower than 10 (strictly) then Git will interpret this
|
|
value as an open file descriptor and will try to write the
|
|
trace messages into this file descriptor.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Alternatively, if the variable is set to an absolute path
|
|
(starting with a <em>/</em> character), Git will interpret this
|
|
as a file path and will try to append the trace messages
|
|
to it. If the path already exists and is a directory, the
|
|
trace messages will be written to files (one per process)
|
|
in that directory, named according to the last component
|
|
of the SID and an optional counter (to avoid filename
|
|
collisions).</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>In addition, if the variable is set to
|
|
<code>af_unix:</code>[<em><socket-type></em><code>:</code>]<em><absolute-pathname></em>, Git will try
|
|
to open the path as a Unix Domain Socket. The socket type
|
|
can be either <code>stream</code> or <code>dgram</code>.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Unsetting the variable, or setting it to empty, "0" or
|
|
"false" (case insensitive) disables trace messages.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>See <a href="technical/api-trace2.html">Trace2 documentation</a>
|
|
for full details.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE2_EVENT</code></dt>
|
|
<dd>
|
|
<p>This setting writes a JSON-based format that is suited for machine
|
|
interpretation.
|
|
See <code>GIT_TRACE2</code> for available trace output options and
|
|
<a href="technical/api-trace2.html">Trace2 documentation</a> for full details.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE2_PERF</code></dt>
|
|
<dd>
|
|
<p>In addition to the text-based messages available in <code>GIT_TRACE2</code>, this
|
|
setting writes a column-based format for understanding nesting
|
|
regions.
|
|
See <code>GIT_TRACE2</code> for available trace output options and
|
|
<a href="technical/api-trace2.html">Trace2 documentation</a> for full details.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_TRACE_REDACT</code></dt>
|
|
<dd>
|
|
<p>By default, when tracing is activated, Git redacts the values of
|
|
cookies, the "Authorization:" header, the "Proxy-Authorization:"
|
|
header and packfile URIs. Set this Boolean environment variable to false to prevent this
|
|
redaction.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_NO_REPLACE_OBJECTS</code></dt>
|
|
<dd>
|
|
<p>Setting and exporting this environment variable tells Git to
|
|
ignore replacement refs and do not replace Git objects.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_LITERAL_PATHSPECS</code></dt>
|
|
<dd>
|
|
<p>Setting this Boolean environment variable to true will cause Git to treat all
|
|
pathspecs literally, rather than as glob patterns. For example,
|
|
running <code>GIT_LITERAL_PATHSPECS=1</code> <code>git</code> <code>log</code> <code>--</code> '*.<code>c</code>' will search
|
|
for commits that touch the path *.<code>c</code>, not any paths that the
|
|
glob *.<code>c</code> matches. You might want this if you are feeding
|
|
literal paths to Git (e.g., paths previously given to you by
|
|
<code>git</code> <code>ls-tree</code>, <code>--raw</code> diff output, etc).</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_GLOB_PATHSPECS</code></dt>
|
|
<dd>
|
|
<p>Setting this Boolean environment variable to true will cause Git to treat all
|
|
pathspecs as glob patterns (aka "glob" magic).</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_NOGLOB_PATHSPECS</code></dt>
|
|
<dd>
|
|
<p>Setting this Boolean environment variable to true will cause Git to treat all
|
|
pathspecs as literal (aka "literal" magic).</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_ICASE_PATHSPECS</code></dt>
|
|
<dd>
|
|
<p>Setting this Boolean environment variable to true will cause Git to treat all
|
|
pathspecs as case-insensitive.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_NO_LAZY_FETCH</code></dt>
|
|
<dd>
|
|
<p>Setting this Boolean environment variable to true tells Git
|
|
not to lazily fetch missing objects from the promisor remote
|
|
on demand.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_REFLOG_ACTION</code></dt>
|
|
<dd>
|
|
<p>When a ref is updated, reflog entries are created to keep
|
|
track of the reason why the ref was updated (which is
|
|
typically the name of the high-level command that updated
|
|
the ref), in addition to the old and new values of the ref.
|
|
A scripted Porcelain command can use set_reflog_action
|
|
helper function in <code>git-sh-setup</code> to set its name to this
|
|
variable when it is invoked as the top level command by the
|
|
end user, to be recorded in the body of the reflog.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_REF_PARANOIA</code></dt>
|
|
<dd>
|
|
<p>If this Boolean environment variable is set to false, ignore broken or badly named refs when iterating
|
|
over lists of refs. Normally Git will try to include any such
|
|
refs, which may cause some operations to fail. This is usually
|
|
preferable, as potentially destructive operations (e.g.,
|
|
<a href="git-prune.html">git-prune(1)</a>) are better off aborting rather than
|
|
ignoring broken refs (and thus considering the history they
|
|
point to as not worth saving). The default value is <code>1</code> (i.e.,
|
|
be paranoid about detecting and aborting all operations). You
|
|
should not normally need to set this to <code>0</code>, but it may be
|
|
useful when trying to salvage data from a corrupted repository.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_COMMIT_GRAPH_PARANOIA</code></dt>
|
|
<dd>
|
|
<p>When loading a commit object from the commit-graph, Git performs an
|
|
existence check on the object in the object database. This is done to
|
|
avoid issues with stale commit-graphs that contain references to
|
|
already-deleted commits, but comes with a performance penalty.</p>
|
|
<div class="paragraph">
|
|
<p>The default is "false", which disables the aforementioned behavior.
|
|
Setting this to "true" enables the existence check so that stale commits
|
|
will never be returned from the commit-graph at the cost of performance.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_ALLOW_PROTOCOL</code></dt>
|
|
<dd>
|
|
<p>If set to a colon-separated list of protocols, behave as if
|
|
<code>protocol.allow</code> is set to <code>never</code>, and each of the listed
|
|
protocols has <code>protocol.</code><em><name></em><code>.allow</code> set to <code>always</code>
|
|
(overriding any existing configuration). See the description of
|
|
<code>protocol.allow</code> in <a href="git-config.html">git-config(1)</a> for more details.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_PROTOCOL_FROM_USER</code></dt>
|
|
<dd>
|
|
<p>Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are
|
|
configured to the <code>user</code> state. This is useful to restrict recursive
|
|
submodule initialization from an untrusted repository or for programs
|
|
which feed potentially-untrusted URLS to git commands. See
|
|
<a href="git-config.html">git-config(1)</a> for more details.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_PROTOCOL</code></dt>
|
|
<dd>
|
|
<p>For internal use only. Used in handshaking the wire protocol.
|
|
Contains a colon <em>:</em> separated list of keys with optional values
|
|
<em><key>[=<value>]</em>. Presence of unknown keys and values must be
|
|
ignored.</p>
|
|
<div class="paragraph">
|
|
<p>Note that servers may need to be configured to allow this variable to
|
|
pass over some transports. It will be propagated automatically when
|
|
accessing local repositories (i.e., <code>file://</code> or a filesystem path), as
|
|
well as over the <code>git://</code> protocol. For git-over-http, it should work
|
|
automatically in most configurations, but see the discussion in
|
|
<a href="git-http-backend.html">git-http-backend(1)</a>. For git-over-ssh, the ssh server may need
|
|
to be configured to allow clients to pass this variable (e.g., by using
|
|
<code>AcceptEnv</code> <code>GIT_PROTOCOL</code> with OpenSSH).</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>This configuration is optional. If the variable is not propagated, then
|
|
clients will fall back to the original "v0" protocol (but may miss out
|
|
on some performance improvements or features). This variable currently
|
|
only affects clones and fetches; it is not yet used for pushes (but may
|
|
be in the future).</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_OPTIONAL_LOCKS</code></dt>
|
|
<dd>
|
|
<p>If this Boolean environment variable is set to false, Git will complete any requested operation without
|
|
performing any optional sub-operations that require taking a lock.
|
|
For example, this will prevent <code>git</code> <code>status</code> from refreshing the
|
|
index as a side effect. This is useful for processes running in
|
|
the background which do not want to cause lock contention with
|
|
other operations on the repository. Defaults to <code>1</code>.</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_REDIRECT_STDIN</code></dt>
|
|
<dt class="hdlist1"><code>GIT_REDIRECT_STDOUT</code></dt>
|
|
<dt class="hdlist1"><code>GIT_REDIRECT_STDERR</code></dt>
|
|
<dd>
|
|
<p>Windows-only: allow redirecting the standard input/output/error
|
|
handles to paths specified by the environment variables. This is
|
|
particularly useful in multi-threaded applications where the
|
|
canonical way to pass standard handles via <code>CreateProcess</code>() is
|
|
not an option because it would require the handles to be marked
|
|
inheritable (and consequently <strong>every</strong> spawned process would
|
|
inherit them, possibly blocking regular Git operations). The
|
|
primary intended use case is to use named pipes for communication
|
|
(e.g. \\.\pipe\my-git-stdin-123).</p>
|
|
<div class="paragraph">
|
|
<p>Two special values are supported: <code>off</code> will simply close the
|
|
corresponding standard handle, and if <code>GIT_REDIRECT_STDERR</code> is
|
|
<code>2</code>>&1, standard error will be redirected to the same handle as
|
|
standard output.</p>
|
|
</div>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_PRINT_SHA1_ELLIPSIS</code> (deprecated)</dt>
|
|
<dd>
|
|
<p>If set to <code>yes</code>, print an ellipsis following an
|
|
(abbreviated) SHA-1 value. This affects indications of
|
|
detached HEADs (<a href="git-checkout.html">git-checkout(1)</a>) and the raw
|
|
diff output (<a href="git-diff.html">git-diff(1)</a>). Printing an
|
|
ellipsis in the cases mentioned is no longer considered
|
|
adequate and support for it is likely to be removed in the
|
|
foreseeable future (along with the variable).</p>
|
|
</dd>
|
|
<dt class="hdlist1"><code>GIT_ADVICE</code></dt>
|
|
<dd>
|
|
<p>If set to <code>0</code>, then disable all advice messages. These messages are
|
|
intended to provide hints to human users that may help them get out of
|
|
problematic situations or take advantage of new features. Users can
|
|
disable individual messages using the <code>advice.</code>* config keys. These
|
|
messages may be disruptive to tools that execute Git processes, so this
|
|
variable is available to disable the messages. (The <code>--no-advice</code>
|
|
global option is also available, but old Git versions may fail when
|
|
this option is not understood. The environment variable will be ignored
|
|
by Git versions that do not understand it.)</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_discussion">Discussion<a id="Discussion"></a></h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>More detail on the following is available from the
|
|
<a href="user-manual.html#git-concepts">Git concepts chapter of the
|
|
user-manual</a> and <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>A Git project normally consists of a working directory with a ".git"
|
|
subdirectory at the top level. The .git directory contains, among other
|
|
things, a compressed object database representing the complete history
|
|
of the project, an "index" file which links that history to the current
|
|
contents of the working tree, and named pointers into that history such
|
|
as tags and branch heads.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The object database contains objects of three main types: blobs, which
|
|
hold file data; trees, which point to blobs and other trees to build up
|
|
directory hierarchies; and commits, which each reference a single tree
|
|
and some number of parent commits.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The commit, equivalent to what other systems call a "changeset" or
|
|
"version", represents a step in the project’s history, and each parent
|
|
represents an immediately preceding step. Commits with more than one
|
|
parent represent merges of independent lines of development.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>All objects are named by the SHA-1 hash of their contents, normally
|
|
written as a string of 40 hex digits. Such names are globally unique.
|
|
The entire history leading up to a commit can be vouched for by signing
|
|
just that commit. A fourth object type, the tag, is provided for this
|
|
purpose.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>When first created, objects are stored in individual files, but for
|
|
efficiency may later be compressed together into "pack files".</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Named pointers called refs mark interesting points in history. A ref
|
|
may contain the SHA-1 name of an object or the name of another ref (the
|
|
latter is called a "symbolic ref").
|
|
Refs with names beginning <code>refs/head/</code> contain the SHA-1 name of the most
|
|
recent commit (or "head") of a branch under development. SHA-1 names of
|
|
tags of interest are stored under <code>refs/tags/</code>. A symbolic ref named
|
|
<code>HEAD</code> contains the name of the currently checked-out branch.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The index file is initialized with a list of all paths and, for each
|
|
path, a blob object and a set of attributes. The blob object represents
|
|
the contents of the file as of the head of the current branch. The
|
|
attributes (last modified time, size, etc.) are taken from the
|
|
corresponding file in the working tree. Subsequent changes to the
|
|
working tree can be found by comparing these attributes. The index may
|
|
be updated with new content, and new commits may be created from the
|
|
content stored in the index.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The index is also capable of storing multiple entries (called "stages")
|
|
for a given pathname. These stages are used to hold the various
|
|
unmerged version of a file when a merge is in progress.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_security">SECURITY</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Some configuration options and hook files may cause Git to run arbitrary
|
|
shell commands. Because configuration and hooks are not copied using
|
|
<code>git</code> <code>clone</code>, it is generally safe to clone remote repositories with
|
|
untrusted content, inspect them with <code>git</code> <code>log</code>, and so on.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>However, it is not safe to run Git commands in a .<code>git</code> directory (or
|
|
the working tree that surrounds it) when that .<code>git</code> directory itself
|
|
comes from an untrusted source. The commands in its config and hooks
|
|
are executed in the usual way.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>By default, Git will refuse to run when the repository is owned by
|
|
someone other than the user running the command. See the entry for
|
|
<code>safe.directory</code> in <a href="git-config.html">git-config(1)</a>. While this can help protect
|
|
you in a multi-user environment, note that you can also acquire
|
|
untrusted repositories that are owned by you (for example, if you
|
|
extract a zip file or tarball from an untrusted source). In such cases,
|
|
you’d need to "sanitize" the untrusted repository first.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>If you have an untrusted .<code>git</code> directory, you should first clone it
|
|
with <code>git</code> <code>clone</code> <code>--no-local</code> to obtain a clean copy. Git does restrict
|
|
the set of options and hooks that will be run by <code>upload-pack</code>, which
|
|
handles the server side of a clone or fetch, but beware that the
|
|
surface area for attack against <code>upload-pack</code> is large, so this does
|
|
carry some risk. The safest thing is to serve the repository as an
|
|
unprivileged user (either via <a href="git-daemon.html">git-daemon(1)</a>, ssh, or using
|
|
other tools to change user ids). See the discussion in the <code>SECURITY</code>
|
|
section of <a href="git-upload-pack.html">git-upload-pack(1)</a>.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_further_documentation">FURTHER DOCUMENTATION</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>See the references in the "description" section to get started
|
|
using Git. The following is probably more detail than necessary
|
|
for a first-time user.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The <a href="user-manual.html#git-concepts">Git concepts chapter of the
|
|
user-manual</a> and <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a> both provide
|
|
introductions to the underlying Git architecture.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>See <a href="gitworkflows.html">gitworkflows(7)</a> for an overview of recommended workflows.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>See also the <a href="howto-index.html">howto</a> documents for some useful
|
|
examples.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>The internals are documented in the
|
|
<a href="technical/api-index.html">Git API documentation</a>.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Users migrating from CVS may also want to
|
|
read <a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_authors">Authors</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Git was started by Linus Torvalds, and is currently maintained by Junio
|
|
C Hamano. Numerous contributions have come from the Git mailing list
|
|
<<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>>. <a href="https://openhub.net/p/git/contributors/summary" class="bare">https://openhub.net/p/git/contributors/summary</a>
|
|
gives you a more complete list of contributors.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>If you have a clone of git.git itself, the
|
|
output of <a href="git-shortlog.html">git-shortlog(1)</a> and <a href="git-blame.html">git-blame(1)</a> can show you
|
|
the authors for specific parts of the project.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_reporting_bugs">Reporting Bugs</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Report bugs to the Git mailing list <<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>> where the
|
|
development and maintenance is primarily done. You do not have to be
|
|
subscribed to the list to send a message there. See the list archive
|
|
at <a href="https://lore.kernel.org/git" class="bare">https://lore.kernel.org/git</a> for previous bug reports and other
|
|
discussions.</p>
|
|
</div>
|
|
<div class="paragraph">
|
|
<p>Issues which are security relevant should be disclosed privately to
|
|
the Git Security mailing list <<a href="mailto:git-security@googlegroups.com">git-security@googlegroups.com</a>>.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_see_also">SEE ALSO</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p><a href="gittutorial.html">gittutorial(7)</a>, <a href="gittutorial-2.html">gittutorial-2(7)</a>,
|
|
<a href="giteveryday.html">giteveryday(7)</a>, <a href="gitcvs-migration.html">gitcvs-migration(7)</a>,
|
|
<a href="gitglossary.html">gitglossary(7)</a>, <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>,
|
|
<a href="gitcli.html">gitcli(7)</a>, <a href="user-manual.html">The Git User’s Manual</a>,
|
|
<a href="gitworkflows.html">gitworkflows(7)</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sect1">
|
|
<h2 id="_git">GIT</h2>
|
|
<div class="sectionbody">
|
|
<div class="paragraph">
|
|
<p>Part of the <a href="git.html">git(1)</a> suite</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="footer">
|
|
<div id="footer-text">
|
|
Last updated 2025-03-17 07:09:38 UTC
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |