| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | 
|  | 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | 
|  | 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | 
|  | 4 | <head> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 5 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 6 | <meta name="generator" content="AsciiDoc 8.6.6" /> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 7 | <title>git-stash(1)</title> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 8 | <style type="text/css"> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 9 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ | 
|  | 10 |  | 
|  | 11 | /* Default font. */ | 
|  | 12 | body { | 
|  | 13 | font-family: Georgia,serif; | 
|  | 14 | } | 
|  | 15 |  | 
|  | 16 | /* Title font. */ | 
|  | 17 | h1, h2, h3, h4, h5, h6, | 
|  | 18 | div.title, caption.title, | 
|  | 19 | thead, p.table.header, | 
|  | 20 | #toctitle, | 
|  | 21 | #author, #revnumber, #revdate, #revremark, | 
|  | 22 | #footer { | 
|  | 23 | font-family: Arial,Helvetica,sans-serif; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 24 | } | 
|  | 25 |  | 
|  | 26 | body { | 
|  | 27 | margin: 1em 5% 1em 5%; | 
|  | 28 | } | 
|  | 29 |  | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 30 | a { | 
|  | 31 | color: blue; | 
|  | 32 | text-decoration: underline; | 
|  | 33 | } | 
|  | 34 | a:visited { | 
|  | 35 | color: fuchsia; | 
|  | 36 | } | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 37 |  | 
|  | 38 | em { | 
|  | 39 | font-style: italic; | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 40 | color: navy; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 41 | } | 
|  | 42 |  | 
|  | 43 | strong { | 
|  | 44 | font-weight: bold; | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 45 | color: #083194; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 46 | } | 
|  | 47 |  | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 48 | h1, h2, h3, h4, h5, h6 { | 
|  | 49 | color: #527bbd; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 50 | margin-top: 1.2em; | 
|  | 51 | margin-bottom: 0.5em; | 
|  | 52 | line-height: 1.3; | 
|  | 53 | } | 
|  | 54 |  | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 55 | h1, h2, h3 { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 56 | border-bottom: 2px solid silver; | 
|  | 57 | } | 
|  | 58 | h2 { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 59 | padding-top: 0.5em; | 
|  | 60 | } | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 61 | h3 { | 
|  | 62 | float: left; | 
|  | 63 | } | 
|  | 64 | h3 + * { | 
|  | 65 | clear: left; | 
|  | 66 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 67 | h5 { | 
|  | 68 | font-size: 1.0em; | 
|  | 69 | } | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 70 |  | 
|  | 71 | div.sectionbody { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 72 | margin-left: 0; | 
|  | 73 | } | 
|  | 74 |  | 
|  | 75 | hr { | 
|  | 76 | border: 1px solid silver; | 
|  | 77 | } | 
|  | 78 |  | 
|  | 79 | p { | 
|  | 80 | margin-top: 0.5em; | 
|  | 81 | margin-bottom: 0.5em; | 
|  | 82 | } | 
|  | 83 |  | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 84 | ul, ol, li > p { | 
|  | 85 | margin-top: 0; | 
|  | 86 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 87 | ul > li { color: #aaa; } | 
|  | 88 | ul > li > * { color: black; } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 89 |  | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 90 | pre { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 91 | padding: 0; | 
|  | 92 | margin: 0; | 
|  | 93 | } | 
|  | 94 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 95 | #author { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 96 | color: #527bbd; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 97 | font-weight: bold; | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 98 | font-size: 1.1em; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 99 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 100 | #email { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 101 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 102 | #revnumber, #revdate, #revremark { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 103 | } | 
|  | 104 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 105 | #footer { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 106 | font-size: small; | 
|  | 107 | border-top: 2px solid silver; | 
|  | 108 | padding-top: 0.5em; | 
|  | 109 | margin-top: 4.0em; | 
|  | 110 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 111 | #footer-text { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 112 | float: left; | 
|  | 113 | padding-bottom: 0.5em; | 
|  | 114 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 115 | #footer-badges { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 116 | float: right; | 
|  | 117 | padding-bottom: 0.5em; | 
|  | 118 | } | 
|  | 119 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 120 | #preamble { | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 121 | margin-top: 1.5em; | 
|  | 122 | margin-bottom: 1.5em; | 
|  | 123 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 124 | div.imageblock, div.exampleblock, div.verseblock, | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 125 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, | 
|  | 126 | div.admonitionblock { | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 127 | margin-top: 1.0em; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 128 | margin-bottom: 1.5em; | 
|  | 129 | } | 
|  | 130 | div.admonitionblock { | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 131 | margin-top: 2.0em; | 
|  | 132 | margin-bottom: 2.0em; | 
|  | 133 | margin-right: 10%; | 
|  | 134 | color: #606060; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 135 | } | 
|  | 136 |  | 
|  | 137 | div.content { /* Block element content. */ | 
|  | 138 | padding: 0; | 
|  | 139 | } | 
|  | 140 |  | 
|  | 141 | /* Block element titles. */ | 
|  | 142 | div.title, caption.title { | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 143 | color: #527bbd; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 144 | font-weight: bold; | 
|  | 145 | text-align: left; | 
|  | 146 | margin-top: 1.0em; | 
|  | 147 | margin-bottom: 0.5em; | 
|  | 148 | } | 
|  | 149 | div.title + * { | 
|  | 150 | margin-top: 0; | 
|  | 151 | } | 
|  | 152 |  | 
|  | 153 | td div.title:first-child { | 
|  | 154 | margin-top: 0.0em; | 
|  | 155 | } | 
|  | 156 | div.content div.title:first-child { | 
|  | 157 | margin-top: 0.0em; | 
|  | 158 | } | 
|  | 159 | div.content + div.title { | 
|  | 160 | margin-top: 0.0em; | 
|  | 161 | } | 
|  | 162 |  | 
|  | 163 | div.sidebarblock > div.content { | 
|  | 164 | background: #ffffee; | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 165 | border: 1px solid #dddddd; | 
|  | 166 | border-left: 4px solid #f0f0f0; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 167 | padding: 0.5em; | 
|  | 168 | } | 
|  | 169 |  | 
|  | 170 | div.listingblock > div.content { | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 171 | border: 1px solid #dddddd; | 
|  | 172 | border-left: 5px solid #f0f0f0; | 
|  | 173 | background: #f8f8f8; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 174 | padding: 0.5em; | 
|  | 175 | } | 
|  | 176 |  | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 177 | div.quoteblock, div.verseblock { | 
|  | 178 | padding-left: 1.0em; | 
|  | 179 | margin-left: 1.0em; | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 180 | margin-right: 10%; | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 181 | border-left: 5px solid #f0f0f0; | 
|  | 182 | color: #888; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 183 | } | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 184 |  | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 185 | div.quoteblock > div.attribution { | 
|  | 186 | padding-top: 0.5em; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 187 | text-align: right; | 
|  | 188 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 189 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 190 | div.verseblock > pre.content { | 
|  | 191 | font-family: inherit; | 
|  | 192 | font-size: inherit; | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 193 | } | 
|  | 194 | div.verseblock > div.attribution { | 
|  | 195 | padding-top: 0.75em; | 
|  | 196 | text-align: left; | 
|  | 197 | } | 
|  | 198 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 199 | div.verseblock + div.attribution { | 
|  | 200 | text-align: left; | 
|  | 201 | } | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 202 |  | 
|  | 203 | div.admonitionblock .icon { | 
|  | 204 | vertical-align: top; | 
|  | 205 | font-size: 1.1em; | 
|  | 206 | font-weight: bold; | 
|  | 207 | text-decoration: underline; | 
|  | 208 | color: #527bbd; | 
|  | 209 | padding-right: 0.5em; | 
|  | 210 | } | 
|  | 211 | div.admonitionblock td.content { | 
|  | 212 | padding-left: 0.5em; | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 213 | border-left: 3px solid #dddddd; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 214 | } | 
|  | 215 |  | 
|  | 216 | div.exampleblock > div.content { | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 217 | border-left: 3px solid #dddddd; | 
|  | 218 | padding-left: 0.5em; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 219 | } | 
|  | 220 |  | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 221 | div.imageblock div.content { padding-left: 0; } | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 222 | span.image img { border-style: none; } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 223 | a.image:visited { color: white; } | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 224 |  | 
|  | 225 | dl { | 
|  | 226 | margin-top: 0.8em; | 
|  | 227 | margin-bottom: 0.8em; | 
|  | 228 | } | 
|  | 229 | dt { | 
|  | 230 | margin-top: 0.5em; | 
|  | 231 | margin-bottom: 0; | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 232 | font-style: normal; | 
|  | 233 | color: navy; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 234 | } | 
|  | 235 | dd > *:first-child { | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 236 | margin-top: 0.1em; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 237 | } | 
|  | 238 |  | 
|  | 239 | ul, ol { | 
|  | 240 | list-style-position: outside; | 
|  | 241 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 242 | ol.arabic { | 
|  | 243 | list-style-type: decimal; | 
|  | 244 | } | 
|  | 245 | ol.loweralpha { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 246 | list-style-type: lower-alpha; | 
|  | 247 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 248 | ol.upperalpha { | 
|  | 249 | list-style-type: upper-alpha; | 
|  | 250 | } | 
|  | 251 | ol.lowerroman { | 
|  | 252 | list-style-type: lower-roman; | 
|  | 253 | } | 
|  | 254 | ol.upperroman { | 
|  | 255 | list-style-type: upper-roman; | 
|  | 256 | } | 
|  | 257 |  | 
|  | 258 | div.compact ul, div.compact ol, | 
|  | 259 | div.compact p, div.compact p, | 
|  | 260 | div.compact div, div.compact div { | 
|  | 261 | margin-top: 0.1em; | 
|  | 262 | margin-bottom: 0.1em; | 
|  | 263 | } | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 264 |  | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 265 | tfoot { | 
|  | 266 | font-weight: bold; | 
|  | 267 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 268 | td > div.verse { | 
|  | 269 | white-space: pre; | 
|  | 270 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 271 |  | 
|  | 272 | div.hdlist { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 273 | margin-top: 0.8em; | 
|  | 274 | margin-bottom: 0.8em; | 
|  | 275 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 276 | div.hdlist tr { | 
|  | 277 | padding-bottom: 15px; | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 278 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 279 | dt.hdlist1.strong, td.hdlist1.strong { | 
|  | 280 | font-weight: bold; | 
|  | 281 | } | 
|  | 282 | td.hdlist1 { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 283 | vertical-align: top; | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 284 | font-style: normal; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 285 | padding-right: 0.8em; | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 286 | color: navy; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 287 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 288 | td.hdlist2 { | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 289 | vertical-align: top; | 
|  | 290 | } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 291 | div.hdlist.compact tr { | 
|  | 292 | margin: 0; | 
|  | 293 | padding-bottom: 0; | 
|  | 294 | } | 
|  | 295 |  | 
|  | 296 | .comment { | 
|  | 297 | background: yellow; | 
|  | 298 | } | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 299 |  | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 300 | .footnote, .footnoteref { | 
|  | 301 | font-size: 0.8em; | 
|  | 302 | } | 
|  | 303 |  | 
|  | 304 | span.footnote, span.footnoteref { | 
|  | 305 | vertical-align: super; | 
|  | 306 | } | 
|  | 307 |  | 
|  | 308 | #footnotes { | 
|  | 309 | margin: 20px 0 20px 0; | 
|  | 310 | padding: 7px 0 0 0; | 
|  | 311 | } | 
|  | 312 |  | 
|  | 313 | #footnotes div.footnote { | 
|  | 314 | margin: 0 0 5px 0; | 
|  | 315 | } | 
|  | 316 |  | 
|  | 317 | #footnotes hr { | 
|  | 318 | border: none; | 
|  | 319 | border-top: 1px solid silver; | 
|  | 320 | height: 1px; | 
|  | 321 | text-align: left; | 
|  | 322 | margin-left: 0; | 
|  | 323 | width: 20%; | 
|  | 324 | min-width: 100px; | 
|  | 325 | } | 
|  | 326 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 327 | div.colist td { | 
|  | 328 | padding-right: 0.5em; | 
|  | 329 | padding-bottom: 0.3em; | 
|  | 330 | vertical-align: top; | 
|  | 331 | } | 
|  | 332 | div.colist td img { | 
|  | 333 | margin-top: 0.3em; | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 334 | } | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 335 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 336 | @media print { | 
|  | 337 | #footer-badges { display: none; } | 
|  | 338 | } | 
|  | 339 |  | 
|  | 340 | #toc { | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 341 | margin-bottom: 2.5em; | 
|  | 342 | } | 
|  | 343 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 344 | #toctitle { | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 345 | color: #527bbd; | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 346 | font-size: 1.1em; | 
|  | 347 | font-weight: bold; | 
|  | 348 | margin-top: 1.0em; | 
|  | 349 | margin-bottom: 0.1em; | 
|  | 350 | } | 
|  | 351 |  | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 352 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 353 | margin-top: 0; | 
|  | 354 | margin-bottom: 0; | 
|  | 355 | } | 
|  | 356 | div.toclevel2 { | 
|  | 357 | margin-left: 2em; | 
|  | 358 | font-size: 0.9em; | 
|  | 359 | } | 
|  | 360 | div.toclevel3 { | 
|  | 361 | margin-left: 4em; | 
|  | 362 | font-size: 0.9em; | 
|  | 363 | } | 
|  | 364 | div.toclevel4 { | 
|  | 365 | margin-left: 6em; | 
|  | 366 | font-size: 0.9em; | 
|  | 367 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 368 |  | 
|  | 369 | span.aqua { color: aqua; } | 
|  | 370 | span.black { color: black; } | 
|  | 371 | span.blue { color: blue; } | 
|  | 372 | span.fuchsia { color: fuchsia; } | 
|  | 373 | span.gray { color: gray; } | 
|  | 374 | span.green { color: green; } | 
|  | 375 | span.lime { color: lime; } | 
|  | 376 | span.maroon { color: maroon; } | 
|  | 377 | span.navy { color: navy; } | 
|  | 378 | span.olive { color: olive; } | 
|  | 379 | span.purple { color: purple; } | 
|  | 380 | span.red { color: red; } | 
|  | 381 | span.silver { color: silver; } | 
|  | 382 | span.teal { color: teal; } | 
|  | 383 | span.white { color: white; } | 
|  | 384 | span.yellow { color: yellow; } | 
|  | 385 |  | 
|  | 386 | span.aqua-background { background: aqua; } | 
|  | 387 | span.black-background { background: black; } | 
|  | 388 | span.blue-background { background: blue; } | 
|  | 389 | span.fuchsia-background { background: fuchsia; } | 
|  | 390 | span.gray-background { background: gray; } | 
|  | 391 | span.green-background { background: green; } | 
|  | 392 | span.lime-background { background: lime; } | 
|  | 393 | span.maroon-background { background: maroon; } | 
|  | 394 | span.navy-background { background: navy; } | 
|  | 395 | span.olive-background { background: olive; } | 
|  | 396 | span.purple-background { background: purple; } | 
|  | 397 | span.red-background { background: red; } | 
|  | 398 | span.silver-background { background: silver; } | 
|  | 399 | span.teal-background { background: teal; } | 
|  | 400 | span.white-background { background: white; } | 
|  | 401 | span.yellow-background { background: yellow; } | 
|  | 402 |  | 
|  | 403 | span.big { font-size: 2em; } | 
|  | 404 | span.small { font-size: 0.6em; } | 
|  | 405 |  | 
|  | 406 | span.underline { text-decoration: underline; } | 
|  | 407 | span.overline { text-decoration: overline; } | 
|  | 408 | span.line-through { text-decoration: line-through; } | 
|  | 409 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 410 |  | 
|  | 411 | /* | 
|  | 412 | * xhtml11 specific | 
|  | 413 | * | 
|  | 414 | * */ | 
|  | 415 |  | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 416 | tt { | 
|  | 417 | font-family: monospace; | 
|  | 418 | font-size: inherit; | 
|  | 419 | color: navy; | 
|  | 420 | } | 
|  | 421 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 422 | div.tableblock { | 
|  | 423 | margin-top: 1.0em; | 
|  | 424 | margin-bottom: 1.5em; | 
|  | 425 | } | 
|  | 426 | div.tableblock > table { | 
|  | 427 | border: 3px solid #527bbd; | 
|  | 428 | } | 
|  | 429 | thead, p.table.header { | 
|  | 430 | font-weight: bold; | 
|  | 431 | color: #527bbd; | 
|  | 432 | } | 
|  | 433 | p.table { | 
|  | 434 | margin-top: 0; | 
|  | 435 | } | 
|  | 436 | /* Because the table frame attribute is overriden by CSS in most browsers. */ | 
|  | 437 | div.tableblock > table[frame="void"] { | 
|  | 438 | border-style: none; | 
|  | 439 | } | 
|  | 440 | div.tableblock > table[frame="hsides"] { | 
|  | 441 | border-left-style: none; | 
|  | 442 | border-right-style: none; | 
|  | 443 | } | 
|  | 444 | div.tableblock > table[frame="vsides"] { | 
|  | 445 | border-top-style: none; | 
|  | 446 | border-bottom-style: none; | 
|  | 447 | } | 
|  | 448 |  | 
|  | 449 |  | 
|  | 450 | /* | 
|  | 451 | * html5 specific | 
|  | 452 | * | 
|  | 453 | * */ | 
|  | 454 |  | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 455 | .monospaced { | 
|  | 456 | font-family: monospace; | 
|  | 457 | font-size: inherit; | 
|  | 458 | color: navy; | 
|  | 459 | } | 
|  | 460 |  | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 461 | table.tableblock { | 
|  | 462 | margin-top: 1.0em; | 
|  | 463 | margin-bottom: 1.5em; | 
|  | 464 | } | 
|  | 465 | thead, p.tableblock.header { | 
|  | 466 | font-weight: bold; | 
|  | 467 | color: #527bbd; | 
|  | 468 | } | 
|  | 469 | p.tableblock { | 
|  | 470 | margin-top: 0; | 
|  | 471 | } | 
|  | 472 | table.tableblock { | 
|  | 473 | border-width: 3px; | 
|  | 474 | border-spacing: 0px; | 
|  | 475 | border-style: solid; | 
|  | 476 | border-color: #527bbd; | 
|  | 477 | border-collapse: collapse; | 
|  | 478 | } | 
|  | 479 | th.tableblock, td.tableblock { | 
|  | 480 | border-width: 1px; | 
|  | 481 | padding: 4px; | 
|  | 482 | border-style: solid; | 
|  | 483 | border-color: #527bbd; | 
|  | 484 | } | 
|  | 485 |  | 
|  | 486 | table.tableblock.frame-topbot { | 
|  | 487 | border-left-style: hidden; | 
|  | 488 | border-right-style: hidden; | 
|  | 489 | } | 
|  | 490 | table.tableblock.frame-sides { | 
|  | 491 | border-top-style: hidden; | 
|  | 492 | border-bottom-style: hidden; | 
|  | 493 | } | 
|  | 494 | table.tableblock.frame-none { | 
|  | 495 | border-style: hidden; | 
|  | 496 | } | 
|  | 497 |  | 
|  | 498 | th.tableblock.halign-left, td.tableblock.halign-left { | 
|  | 499 | text-align: left; | 
|  | 500 | } | 
|  | 501 | th.tableblock.halign-center, td.tableblock.halign-center { | 
|  | 502 | text-align: center; | 
|  | 503 | } | 
|  | 504 | th.tableblock.halign-right, td.tableblock.halign-right { | 
|  | 505 | text-align: right; | 
|  | 506 | } | 
|  | 507 |  | 
|  | 508 | th.tableblock.valign-top, td.tableblock.valign-top { | 
|  | 509 | vertical-align: top; | 
|  | 510 | } | 
|  | 511 | th.tableblock.valign-middle, td.tableblock.valign-middle { | 
|  | 512 | vertical-align: middle; | 
|  | 513 | } | 
|  | 514 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { | 
|  | 515 | vertical-align: bottom; | 
|  | 516 | } | 
|  | 517 |  | 
|  | 518 |  | 
|  | 519 | /* | 
|  | 520 | * manpage specific | 
|  | 521 | * | 
|  | 522 | * */ | 
|  | 523 |  | 
|  | 524 | body.manpage h1 { | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 525 | padding-top: 0.5em; | 
|  | 526 | padding-bottom: 0.5em; | 
|  | 527 | border-top: 2px solid silver; | 
|  | 528 | border-bottom: 2px solid silver; | 
|  | 529 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 530 | body.manpage h2 { | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 531 | border-style: none; | 
|  | 532 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 533 | body.manpage div.sectionbody { | 
|  | 534 | margin-left: 3em; | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 535 | } | 
|  | 536 |  | 
|  | 537 | @media print { | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 538 | body.manpage div#toc { display: none; } | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 539 | } | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 540 | </style> | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 541 | <script type="text/javascript"> | 
|  | 542 | /*<![CDATA[*/ | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 543 | var asciidoc = { // Namespace. | 
|  | 544 |  | 
|  | 545 | ///////////////////////////////////////////////////////////////////// | 
|  | 546 | // Table Of Contents generator | 
|  | 547 | ///////////////////////////////////////////////////////////////////// | 
|  | 548 |  | 
|  | 549 | /* Author: Mihai Bazon, September 2002 | 
|  | 550 | * http://students.infoiasi.ro/~mishoo | 
|  | 551 | * | 
|  | 552 | * Table Of Content generator | 
|  | 553 | * Version: 0.4 | 
|  | 554 | * | 
|  | 555 | * Feel free to use this script under the terms of the GNU General Public | 
|  | 556 | * License, as long as you do not remove or alter this notice. | 
|  | 557 | */ | 
|  | 558 |  | 
|  | 559 | /* modified by Troy D. Hanson, September 2006. License: GPL */ | 
|  | 560 | /* modified by Stuart Rackham, 2006, 2009. License: GPL */ | 
|  | 561 |  | 
|  | 562 | // toclevels = 1..4. | 
|  | 563 | toc: function (toclevels) { | 
|  | 564 |  | 
|  | 565 | function getText(el) { | 
|  | 566 | var text = ""; | 
|  | 567 | for (var i = el.firstChild; i != null; i = i.nextSibling) { | 
|  | 568 | if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. | 
|  | 569 | text += i.data; | 
|  | 570 | else if (i.firstChild != null) | 
|  | 571 | text += getText(i); | 
|  | 572 | } | 
|  | 573 | return text; | 
|  | 574 | } | 
|  | 575 |  | 
|  | 576 | function TocEntry(el, text, toclevel) { | 
|  | 577 | this.element = el; | 
|  | 578 | this.text = text; | 
|  | 579 | this.toclevel = toclevel; | 
|  | 580 | } | 
|  | 581 |  | 
|  | 582 | function tocEntries(el, toclevels) { | 
|  | 583 | var result = new Array; | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 584 | var re = new RegExp('[hH]([2-'+(toclevels+1)+'])'); | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 585 | // Function that scans the DOM tree for header elements (the DOM2 | 
|  | 586 | // nodeIterator API would be a better technique but not supported by all | 
|  | 587 | // browsers). | 
|  | 588 | var iterate = function (el) { | 
|  | 589 | for (var i = el.firstChild; i != null; i = i.nextSibling) { | 
|  | 590 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { | 
|  | 591 | var mo = re.exec(i.tagName); | 
|  | 592 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { | 
|  | 593 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); | 
|  | 594 | } | 
|  | 595 | iterate(i); | 
|  | 596 | } | 
|  | 597 | } | 
|  | 598 | } | 
|  | 599 | iterate(el); | 
|  | 600 | return result; | 
|  | 601 | } | 
|  | 602 |  | 
|  | 603 | var toc = document.getElementById("toc"); | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 604 | if (!toc) { | 
|  | 605 | return; | 
|  | 606 | } | 
|  | 607 |  | 
|  | 608 | // Delete existing TOC entries in case we're reloading the TOC. | 
|  | 609 | var tocEntriesToRemove = []; | 
|  | 610 | var i; | 
|  | 611 | for (i = 0; i < toc.childNodes.length; i++) { | 
|  | 612 | var entry = toc.childNodes[i]; | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 613 | if (entry.nodeName == 'div' | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 614 | && entry.getAttribute("class") | 
|  | 615 | && entry.getAttribute("class").match(/^toclevel/)) | 
|  | 616 | tocEntriesToRemove.push(entry); | 
|  | 617 | } | 
|  | 618 | for (i = 0; i < tocEntriesToRemove.length; i++) { | 
|  | 619 | toc.removeChild(tocEntriesToRemove[i]); | 
|  | 620 | } | 
|  | 621 |  | 
|  | 622 | // Rebuild TOC entries. | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 623 | var entries = tocEntries(document.getElementById("content"), toclevels); | 
|  | 624 | for (var i = 0; i < entries.length; ++i) { | 
|  | 625 | var entry = entries[i]; | 
|  | 626 | if (entry.element.id == "") | 
|  | 627 | entry.element.id = "_toc_" + i; | 
|  | 628 | var a = document.createElement("a"); | 
|  | 629 | a.href = "#" + entry.element.id; | 
|  | 630 | a.appendChild(document.createTextNode(entry.text)); | 
|  | 631 | var div = document.createElement("div"); | 
|  | 632 | div.appendChild(a); | 
|  | 633 | div.className = "toclevel" + entry.toclevel; | 
|  | 634 | toc.appendChild(div); | 
|  | 635 | } | 
|  | 636 | if (entries.length == 0) | 
|  | 637 | toc.parentNode.removeChild(toc); | 
|  | 638 | }, | 
|  | 639 |  | 
|  | 640 |  | 
|  | 641 | ///////////////////////////////////////////////////////////////////// | 
|  | 642 | // Footnotes generator | 
|  | 643 | ///////////////////////////////////////////////////////////////////// | 
|  | 644 |  | 
|  | 645 | /* Based on footnote generation code from: | 
|  | 646 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html | 
|  | 647 | */ | 
|  | 648 |  | 
|  | 649 | footnotes: function () { | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 650 | // Delete existing footnote entries in case we're reloading the footnodes. | 
|  | 651 | var i; | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 652 | var noteholder = document.getElementById("footnotes"); | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 653 | if (!noteholder) { | 
|  | 654 | return; | 
|  | 655 | } | 
|  | 656 | var entriesToRemove = []; | 
|  | 657 | for (i = 0; i < noteholder.childNodes.length; i++) { | 
|  | 658 | var entry = noteholder.childNodes[i]; | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 659 | if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote") | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 660 | entriesToRemove.push(entry); | 
|  | 661 | } | 
|  | 662 | for (i = 0; i < entriesToRemove.length; i++) { | 
|  | 663 | noteholder.removeChild(entriesToRemove[i]); | 
|  | 664 | } | 
|  | 665 |  | 
|  | 666 | // Rebuild footnote entries. | 
|  | 667 | var cont = document.getElementById("content"); | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 668 | var spans = cont.getElementsByTagName("span"); | 
|  | 669 | var refs = {}; | 
|  | 670 | var n = 0; | 
|  | 671 | for (i=0; i<spans.length; i++) { | 
|  | 672 | if (spans[i].className == "footnote") { | 
|  | 673 | n++; | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 674 | var note = spans[i].getAttribute("data-note"); | 
|  | 675 | if (!note) { | 
|  | 676 | // Use [\s\S] in place of . so multi-line matches work. | 
|  | 677 | // Because JavaScript has no s (dotall) regex flag. | 
|  | 678 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; | 
|  | 679 | spans[i].innerHTML = | 
|  | 680 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + | 
|  | 681 | "' title='View footnote' class='footnote'>" + n + "</a>]"; | 
|  | 682 | spans[i].setAttribute("data-note", note); | 
|  | 683 | } | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 684 | noteholder.innerHTML += | 
|  | 685 | "<div class='footnote' id='_footnote_" + n + "'>" + | 
|  | 686 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + | 
|  | 687 | n + "</a>. " + note + "</div>"; | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 688 | var id =spans[i].getAttribute("id"); | 
|  | 689 | if (id != null) refs["#"+id] = n; | 
|  | 690 | } | 
|  | 691 | } | 
|  | 692 | if (n == 0) | 
|  | 693 | noteholder.parentNode.removeChild(noteholder); | 
|  | 694 | else { | 
|  | 695 | // Process footnoterefs. | 
|  | 696 | for (i=0; i<spans.length; i++) { | 
|  | 697 | if (spans[i].className == "footnoteref") { | 
|  | 698 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); | 
|  | 699 | href = href.match(/#.*/)[0]; // Because IE return full URL. | 
|  | 700 | n = refs[href]; | 
|  | 701 | spans[i].innerHTML = | 
|  | 702 | "[<a href='#_footnote_" + n + | 
|  | 703 | "' title='View footnote' class='footnote'>" + n + "</a>]"; | 
|  | 704 | } | 
|  | 705 | } | 
|  | 706 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 707 | }, | 
|  | 708 |  | 
|  | 709 | install: function(toclevels) { | 
|  | 710 | var timerId; | 
|  | 711 |  | 
|  | 712 | function reinstall() { | 
|  | 713 | asciidoc.footnotes(); | 
|  | 714 | if (toclevels) { | 
|  | 715 | asciidoc.toc(toclevels); | 
|  | 716 | } | 
|  | 717 | } | 
|  | 718 |  | 
|  | 719 | function reinstallAndRemoveTimer() { | 
|  | 720 | clearInterval(timerId); | 
|  | 721 | reinstall(); | 
|  | 722 | } | 
|  | 723 |  | 
|  | 724 | timerId = setInterval(reinstall, 500); | 
|  | 725 | if (document.addEventListener) | 
|  | 726 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); | 
|  | 727 | else | 
|  | 728 | window.onload = reinstallAndRemoveTimer; | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 729 | } | 
|  | 730 |  | 
|  | 731 | } | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 732 | asciidoc.install(); | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 733 | /*]]>*/ | 
|  | 734 | </script> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 735 | </head> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 736 | <body class="manpage"> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 737 | <div id="header"> | 
|  | 738 | <h1> | 
|  | 739 | git-stash(1) Manual Page | 
|  | 740 | </h1> | 
|  | 741 | <h2>NAME</h2> | 
|  | 742 | <div class="sectionbody"> | 
|  | 743 | <p>git-stash - | 
|  | 744 | Stash the changes in a dirty working directory away | 
|  | 745 | </p> | 
|  | 746 | </div> | 
|  | 747 | </div> | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 748 | <div id="content"> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 749 | <div class="sect1"> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 750 | <h2 id="_synopsis">SYNOPSIS</h2> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 751 | <div class="sectionbody"> | 
|  | 752 | <div class="verseblock"> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 753 | <pre class="content"><em>git stash</em> list [<options>] | 
| Junio C Hamano | 2c14c8d | 2009-07-02 03:17:00 | [diff] [blame] | 754 | <em>git stash</em> show [<stash>] | 
|  | 755 | <em>git stash</em> drop [-q|--quiet] [<stash>] | 
|  | 756 | <em>git stash</em> ( pop | apply ) [--index] [-q|--quiet] [<stash>] | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 757 | <em>git stash</em> branch <branchname> [<stash>] | 
| Junio C Hamano | 5075739 | 2013-06-27 22:26:58 | [diff] [blame] | 758 | <em>git stash</em> [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet] | 
| Junio C Hamano | 8a91431 | 2013-08-14 20:47:41 | [diff] [blame] | 759 | [-u|--include-untracked] [-a|--all] [<message>]] | 
| Junio C Hamano | 9e96a1a | 2008-08-16 10:23:18 | [diff] [blame] | 760 | <em>git stash</em> clear | 
| Junio C Hamano | 5075739 | 2013-06-27 22:26:58 | [diff] [blame] | 761 | <em>git stash</em> create [<message>] | 
|  | 762 | <em>git stash</em> store [-m|--message <message>] [-q|--quiet] <commit></pre> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 763 | <div class="attribution"> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 764 | </div></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 765 | </div> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 766 | </div> | 
|  | 767 | <div class="sect1"> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 768 | <h2 id="_description">DESCRIPTION</h2> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 769 | <div class="sectionbody"> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 770 | <div class="paragraph"><p>Use <tt>git stash</tt> when you want to record the current state of the | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 771 | working directory and the index, but want to go back to a clean | 
|  | 772 | working directory. The command saves your local modifications away | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 773 | and reverts the working directory to match the <tt>HEAD</tt> commit.</p></div> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 774 | <div class="paragraph"><p>The modifications stashed away by this command can be listed with | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 775 | <tt>git stash list</tt>, inspected with <tt>git stash show</tt>, and restored | 
|  | 776 | (potentially on top of a different commit) with <tt>git stash apply</tt>. | 
|  | 777 | Calling <tt>git stash</tt> without any arguments is equivalent to <tt>git stash save</tt>. | 
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 778 | A stash is by default listed as "WIP on <em>branchname</em> …", but | 
| Junio C Hamano | bb6e078 | 2007-07-19 02:14:50 | [diff] [blame] | 779 | you can give a more descriptive message on the command line when | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 780 | you create one.</p></div> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 781 | <div class="paragraph"><p>The latest stash you created is stored in <tt>refs/stash</tt>; older | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 782 | stashes are found in the reflog of this reference and can be named using | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 783 | the usual reflog syntax (e.g. <tt>stash@{0}</tt> is the most recently | 
|  | 784 | created stash, <tt>stash@{1}</tt> is the one before it, <tt>stash@{2.hours.ago}</tt> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 785 | is also possible).</p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 786 | </div> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 787 | </div> | 
|  | 788 | <div class="sect1"> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 789 | <h2 id="_options">OPTIONS</h2> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 790 | <div class="sectionbody"> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 791 | <div class="dlist"><dl> | 
|  | 792 | <dt class="hdlist1"> | 
| Junio C Hamano | 8a91431 | 2013-08-14 20:47:41 | [diff] [blame] | 793 | save [-p|--patch] [--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>] | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 794 | </dt> | 
|  | 795 | <dd> | 
|  | 796 | <p> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 797 | Save your local modifications to a new <em>stash</em>, and run <tt>git reset | 
|  | 798 | --hard</tt> to revert them. The <message> part is optional and gives | 
| Junio C Hamano | c28068f | 2009-09-08 00:55:23 | [diff] [blame] | 799 | the description along with the stashed state. For quickly making | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 800 | a snapshot, you can omit <em>both</em> "save" and <message>, but giving | 
| Junio C Hamano | c28068f | 2009-09-08 00:55:23 | [diff] [blame] | 801 | only <message> does not trigger this action to prevent a misspelled | 
|  | 802 | subcommand from making an unwanted stash. | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 803 | </p> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 804 | <div class="paragraph"><p>If the <tt>--keep-index</tt> option is used, all changes already added to the | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 805 | index are left intact.</p></div> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 806 | <div class="paragraph"><p>If the <tt>--include-untracked</tt> option is used, all untracked files are also | 
|  | 807 | stashed and then cleaned up with <tt>git clean</tt>, leaving the working directory | 
|  | 808 | in a very clean state. If the <tt>--all</tt> option is used instead then the | 
| Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 809 | ignored files are stashed and cleaned in addition to the untracked files.</p></div> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 810 | <div class="paragraph"><p>With <tt>--patch</tt>, you can interactively select hunks from the diff | 
| Junio C Hamano | c28068f | 2009-09-08 00:55:23 | [diff] [blame] | 811 | between HEAD and the working tree to be stashed. The stash entry is | 
|  | 812 | constructed such that its index state is the same as the index state | 
|  | 813 | of your repository, and its worktree contains only the changes you | 
|  | 814 | selected interactively. The selected changes are then rolled back | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 815 | from your worktree. See the “Interactive Mode” section of | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 816 | <a href="git-add.html">git-add(1)</a> to learn how to operate the <tt>--patch</tt> mode.</p></div> | 
|  | 817 | <div class="paragraph"><p>The <tt>--patch</tt> option implies <tt>--keep-index</tt>. You can use | 
|  | 818 | <tt>--no-keep-index</tt> to override this.</p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 819 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 820 | <dt class="hdlist1"> | 
| Junio C Hamano | 83d46a2 | 2008-02-21 02:29:42 | [diff] [blame] | 821 | list [<options>] | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 822 | </dt> | 
|  | 823 | <dd> | 
|  | 824 | <p> | 
|  | 825 | List the stashes that you currently have. Each <em>stash</em> is listed | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 826 | with its name (e.g. <tt>stash@{0}</tt> is the latest stash, <tt>stash@{1}</tt> is | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 827 | the one before, etc.), the name of the branch that was current when the | 
|  | 828 | stash was made, and a short description of the commit the stash was | 
|  | 829 | based on. | 
|  | 830 | </p> | 
|  | 831 | <div class="listingblock"> | 
|  | 832 | <div class="content"> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 833 | <pre><tt>stash@{0}: WIP on submit: 6ebd0e2... Update git-stash documentation | 
|  | 834 | stash@{1}: On master: 9cc0589... Add git-stash</tt></pre> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 835 | </div></div> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 836 | <div class="paragraph"><p>The command takes options applicable to the <em>git log</em> | 
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 837 | command to control what is shown and how. See <a href="git-log.html">git-log(1)</a>.</p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 838 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 839 | <dt class="hdlist1"> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 840 | show [<stash>] | 
|  | 841 | </dt> | 
|  | 842 | <dd> | 
|  | 843 | <p> | 
| Junio C Hamano | 764a667 | 2007-10-23 01:23:31 | [diff] [blame] | 844 | Show the changes recorded in the stash as a diff between the | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 845 | stashed state and its original parent. When no <tt><stash></tt> is given, | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 846 | shows the latest one. By default, the command shows the diffstat, but | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 847 | it will accept any format known to <em>git diff</em> (e.g., <tt>git stash show | 
|  | 848 | -p stash@{1}</tt> to view the second most recent stash in patch form). | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 849 | </p> | 
|  | 850 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 851 | <dt class="hdlist1"> | 
| Junio C Hamano | 2c14c8d | 2009-07-02 03:17:00 | [diff] [blame] | 852 | pop [--index] [-q|--quiet] [<stash>] | 
| Junio C Hamano | 7d3275e | 2009-05-31 21:53:30 | [diff] [blame] | 853 | </dt> | 
|  | 854 | <dd> | 
|  | 855 | <p> | 
|  | 856 | Remove a single stashed state from the stash list and apply it | 
|  | 857 | on top of the current working tree state, i.e., do the inverse | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 858 | operation of <tt>git stash save</tt>. The working directory must | 
| Junio C Hamano | 7d3275e | 2009-05-31 21:53:30 | [diff] [blame] | 859 | match the index. | 
|  | 860 | </p> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 861 | <div class="paragraph"><p>Applying the state can fail with conflicts; in this case, it is not | 
| Junio C Hamano | 7d3275e | 2009-05-31 21:53:30 | [diff] [blame] | 862 | removed from the stash list. You need to resolve the conflicts by hand | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 863 | and call <tt>git stash drop</tt> manually afterwards.</p></div> | 
|  | 864 | <div class="paragraph"><p>If the <tt>--index</tt> option is used, then tries to reinstate not only the working | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 865 | tree’s changes, but also the index’s ones. However, this can fail, when you | 
| Junio C Hamano | f068d54 | 2009-06-09 15:46:41 | [diff] [blame] | 866 | have conflicts (which are stored in the index, where you therefore can no | 
|  | 867 | longer apply the changes as they were originally).</p></div> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 868 | <div class="paragraph"><p>When no <tt><stash></tt> is given, <tt>stash@{0}</tt> is assumed, otherwise <tt><stash></tt> must | 
|  | 869 | be a reference of the form <tt>stash@{<revision>}</tt>.</p></div> | 
| Junio C Hamano | 7d3275e | 2009-05-31 21:53:30 | [diff] [blame] | 870 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 871 | <dt class="hdlist1"> | 
| Junio C Hamano | 2c14c8d | 2009-07-02 03:17:00 | [diff] [blame] | 872 | apply [--index] [-q|--quiet] [<stash>] | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 873 | </dt> | 
|  | 874 | <dd> | 
|  | 875 | <p> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 876 | Like <tt>pop</tt>, but do not remove the state from the stash list. Unlike <tt>pop</tt>, | 
|  | 877 | <tt><stash></tt> may be any commit that looks like a commit created by | 
|  | 878 | <tt>stash save</tt> or <tt>stash create</tt>. | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 879 | </p> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 880 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 881 | <dt class="hdlist1"> | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 882 | branch <branchname> [<stash>] | 
|  | 883 | </dt> | 
|  | 884 | <dd> | 
|  | 885 | <p> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 886 | Creates and checks out a new branch named <tt><branchname></tt> starting from | 
|  | 887 | the commit at which the <tt><stash></tt> was originally created, applies the | 
|  | 888 | changes recorded in <tt><stash></tt> to the new working tree and index. | 
|  | 889 | If that succeeds, and <tt><stash></tt> is a reference of the form | 
|  | 890 | <tt>stash@{<revision>}</tt>, it then drops the <tt><stash></tt>. When no <tt><stash></tt> | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 891 | is given, applies the latest one. | 
|  | 892 | </p> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 893 | <div class="paragraph"><p>This is useful if the branch on which you ran <tt>git stash save</tt> has | 
|  | 894 | changed enough that <tt>git stash apply</tt> fails due to conflicts. Since | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 895 | the stash is applied on top of the commit that was HEAD at the time | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 896 | <tt>git stash</tt> was run, it restores the originally stashed state with | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 897 | no conflicts.</p></div> | 
|  | 898 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 899 | <dt class="hdlist1"> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 900 | clear | 
|  | 901 | </dt> | 
|  | 902 | <dd> | 
|  | 903 | <p> | 
|  | 904 | Remove all the stashed states. Note that those states will then | 
| Junio C Hamano | 9f88386 | 2009-08-11 06:23:52 | [diff] [blame] | 905 | be subject to pruning, and may be impossible to recover (see | 
|  | 906 | <em>Examples</em> below for a possible strategy). | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 907 | </p> | 
|  | 908 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 909 | <dt class="hdlist1"> | 
| Junio C Hamano | 2c14c8d | 2009-07-02 03:17:00 | [diff] [blame] | 910 | drop [-q|--quiet] [<stash>] | 
| Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 911 | </dt> | 
|  | 912 | <dd> | 
|  | 913 | <p> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 914 | Remove a single stashed state from the stash list. When no <tt><stash></tt> | 
|  | 915 | is given, it removes the latest one. i.e. <tt>stash@{0}</tt>, otherwise | 
|  | 916 | <tt><stash></tt> must be a valid stash log reference of the form | 
|  | 917 | <tt>stash@{<revision>}</tt>. | 
| Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 918 | </p> | 
|  | 919 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 920 | <dt class="hdlist1"> | 
| Junio C Hamano | 9e96a1a | 2008-08-16 10:23:18 | [diff] [blame] | 921 | create | 
|  | 922 | </dt> | 
|  | 923 | <dd> | 
|  | 924 | <p> | 
|  | 925 | Create a stash (which is a regular commit object) and return its | 
|  | 926 | object name, without storing it anywhere in the ref namespace. | 
| Junio C Hamano | 5075739 | 2013-06-27 22:26:58 | [diff] [blame] | 927 | This is intended to be useful for scripts. It is probably not | 
|  | 928 | the command you want to use; see "save" above. | 
|  | 929 | </p> | 
|  | 930 | </dd> | 
|  | 931 | <dt class="hdlist1"> | 
|  | 932 | store | 
|  | 933 | </dt> | 
|  | 934 | <dd> | 
|  | 935 | <p> | 
|  | 936 | Store a given stash created via <em>git stash create</em> (which is a | 
|  | 937 | dangling merge commit) in the stash ref, updating the stash | 
|  | 938 | reflog. This is intended to be useful for scripts. It is | 
|  | 939 | probably not the command you want to use; see "save" above. | 
| Junio C Hamano | 9e96a1a | 2008-08-16 10:23:18 | [diff] [blame] | 940 | </p> | 
|  | 941 | </dd> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 942 | </dl></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 943 | </div> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 944 | </div> | 
|  | 945 | <div class="sect1"> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 946 | <h2 id="_discussion">DISCUSSION</h2> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 947 | <div class="sectionbody"> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 948 | <div class="paragraph"><p>A stash is represented as a commit whose tree records the state of the | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 949 | working directory, and its first parent is the commit at <tt>HEAD</tt> when | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 950 | the stash was created. The tree of the second parent records the | 
|  | 951 | state of the index when the stash is made, and it is made a child of | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 952 | the <tt>HEAD</tt> commit. The ancestry graph looks like this:</p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 953 | <div class="literalblock"> | 
|  | 954 | <div class="content"> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 955 | <pre><tt> .----W | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 956 | / / | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 957 | -----H----I</tt></pre> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 958 | </div></div> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 959 | <div class="paragraph"><p>where <tt>H</tt> is the <tt>HEAD</tt> commit, <tt>I</tt> is a commit that records the state | 
|  | 960 | of the index, and <tt>W</tt> is a commit that records the state of the working | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 961 | tree.</p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 962 | </div> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 963 | </div> | 
|  | 964 | <div class="sect1"> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 965 | <h2 id="_examples">EXAMPLES</h2> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 966 | <div class="sectionbody"> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 967 | <div class="dlist"><dl> | 
|  | 968 | <dt class="hdlist1"> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 969 | Pulling into a dirty tree | 
|  | 970 | </dt> | 
|  | 971 | <dd> | 
|  | 972 | <p> | 
|  | 973 | When you are in the middle of something, you learn that there are | 
|  | 974 | upstream changes that are possibly relevant to what you are | 
|  | 975 | doing. When your local changes do not conflict with the changes in | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 976 | the upstream, a simple <tt>git pull</tt> will let you move forward. | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 977 | </p> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 978 | <div class="paragraph"><p>However, there are cases in which your local changes do conflict with | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 979 | the upstream changes, and <tt>git pull</tt> refuses to overwrite your | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 980 | changes. In such a case, you can stash your changes away, | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 981 | perform a pull, and then unstash, like this:</p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 982 | <div class="listingblock"> | 
|  | 983 | <div class="content"> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 984 | <pre><tt>$ git pull | 
| Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 985 | ... | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 986 | file foobar not up to date, cannot merge. | 
|  | 987 | $ git stash | 
|  | 988 | $ git pull | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 989 | $ git stash pop</tt></pre> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 990 | </div></div> | 
|  | 991 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 992 | <dt class="hdlist1"> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 993 | Interrupted workflow | 
|  | 994 | </dt> | 
|  | 995 | <dd> | 
|  | 996 | <p> | 
|  | 997 | When you are in the middle of something, your boss comes in and | 
|  | 998 | demands that you fix something immediately. Traditionally, you would | 
|  | 999 | make a commit to a temporary branch to store your changes away, and | 
|  | 1000 | return to your original branch to make the emergency fix, like this: | 
|  | 1001 | </p> | 
|  | 1002 | <div class="listingblock"> | 
|  | 1003 | <div class="content"> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1004 | <pre><tt># ... hack hack hack ... | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1005 | $ git checkout -b my_wip | 
|  | 1006 | $ git commit -a -m "WIP" | 
|  | 1007 | $ git checkout master | 
|  | 1008 | $ edit emergency fix | 
|  | 1009 | $ git commit -a -m "Fix in a hurry" | 
|  | 1010 | $ git checkout my_wip | 
|  | 1011 | $ git reset --soft HEAD^ | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1012 | # ... continue hacking ...</tt></pre> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1013 | </div></div> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 1014 | <div class="paragraph"><p>You can use <em>git stash</em> to simplify the above, like this:</p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1015 | <div class="listingblock"> | 
|  | 1016 | <div class="content"> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1017 | <pre><tt># ... hack hack hack ... | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1018 | $ git stash | 
|  | 1019 | $ edit emergency fix | 
|  | 1020 | $ git commit -a -m "Fix in a hurry" | 
| Junio C Hamano | 7d3275e | 2009-05-31 21:53:30 | [diff] [blame] | 1021 | $ git stash pop | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1022 | # ... continue hacking ...</tt></pre> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1023 | </div></div> | 
|  | 1024 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 1025 | <dt class="hdlist1"> | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 1026 | Testing partial commits | 
|  | 1027 | </dt> | 
|  | 1028 | <dd> | 
|  | 1029 | <p> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1030 | You can use <tt>git stash save --keep-index</tt> when you want to make two or | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 1031 | more commits out of the changes in the work tree, and you want to test | 
|  | 1032 | each change before committing: | 
|  | 1033 | </p> | 
|  | 1034 | <div class="listingblock"> | 
|  | 1035 | <div class="content"> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1036 | <pre><tt># ... hack hack hack ... | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 1037 | $ git add --patch foo # add just first part to the index | 
|  | 1038 | $ git stash save --keep-index # save all other changes to the stash | 
|  | 1039 | $ edit/build/test first part | 
| Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1040 | $ git commit -m 'First part' # commit fully tested change | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 1041 | $ git stash pop # prepare to work on all other changes | 
| Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1042 | # ... repeat above five steps until one commit remains ... | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 1043 | $ edit/build/test remaining parts | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1044 | $ git commit foo -m 'Remaining parts'</tt></pre> | 
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 1045 | </div></div> | 
|  | 1046 | </dd> | 
| Junio C Hamano | 103b572 | 2011-01-31 05:03:45 | [diff] [blame] | 1047 | <dt class="hdlist1"> | 
| Junio C Hamano | 9f88386 | 2009-08-11 06:23:52 | [diff] [blame] | 1048 | Recovering stashes that were cleared/dropped erroneously | 
|  | 1049 | </dt> | 
|  | 1050 | <dd> | 
|  | 1051 | <p> | 
|  | 1052 | If you mistakenly drop or clear stashes, they cannot be recovered | 
|  | 1053 | through the normal safety mechanisms. However, you can try the | 
|  | 1054 | following incantation to get a list of stashes that are still in your | 
|  | 1055 | repository, but not reachable any more: | 
|  | 1056 | </p> | 
|  | 1057 | <div class="listingblock"> | 
|  | 1058 | <div class="content"> | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1059 | <pre><tt>git fsck --unreachable | | 
| Junio C Hamano | 9f88386 | 2009-08-11 06:23:52 | [diff] [blame] | 1060 | grep commit | cut -d\ -f3 | | 
| Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame^] | 1061 | xargs git log --merges --no-walk --grep=WIP</tt></pre> | 
| Junio C Hamano | 9f88386 | 2009-08-11 06:23:52 | [diff] [blame] | 1062 | </div></div> | 
|  | 1063 | </dd> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1064 | </dl></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1065 | </div> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1066 | </div> | 
|  | 1067 | <div class="sect1"> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1068 | <h2 id="_see_also">SEE ALSO</h2> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1069 | <div class="sectionbody"> | 
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1070 | <div class="paragraph"><p><a href="git-checkout.html">git-checkout(1)</a>, | 
|  | 1071 | <a href="git-commit.html">git-commit(1)</a>, | 
|  | 1072 | <a href="git-reflog.html">git-reflog(1)</a>, | 
|  | 1073 | <a href="git-reset.html">git-reset(1)</a></p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1074 | </div> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1075 | </div> | 
|  | 1076 | <div class="sect1"> | 
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1077 | <h2 id="_git">GIT</h2> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1078 | <div class="sectionbody"> | 
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1079 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1080 | </div> | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1081 | </div> | 
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1082 | </div> | 
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1083 | <div id="footnotes"><hr /></div> | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1084 | <div id="footer"> | 
|  | 1085 | <div id="footer-text"> | 
| Junio C Hamano | 683a861 | 2013-08-23 20:50:09 | [diff] [blame] | 1086 | Last updated 2013-08-20 08:40:27 PDT | 
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1087 | </div> | 
|  | 1088 | </div> | 
|  | 1089 | </body> | 
|  | 1090 | </html> |