summaryrefslogtreecommitdiffstats
path: root/man1/git-checkout.1
diff options
context:
space:
mode:
Diffstat (limited to 'man1/git-checkout.1')
-rw-r--r--man1/git-checkout.146
1 files changed, 29 insertions, 17 deletions
diff --git a/man1/git-checkout.1 b/man1/git-checkout.1
index fad19f4a5..aafa31a35 100644
--- a/man1/git-checkout.1
+++ b/man1/git-checkout.1
@@ -2,12 +2,12 @@
.\" Title: git-checkout
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 2023-05-09
+.\" Date: 2023-05-10
.\" Manual: Git Manual
-.\" Source: Git 2.40.1.515.g5597cfdf47
+.\" Source: Git 2.40.1.552.g91428f078b
.\" Language: English
.\"
-.TH "GIT\-CHECKOUT" "1" "2023\-05\-09" "Git 2\&.40\&.1\&.515\&.g5597cf" "Git Manual"
+.TH "GIT\-CHECKOUT" "1" "2023\-05\-10" "Git 2\&.40\&.1\&.552\&.g91428f" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -681,8 +681,11 @@ $ git tag foo \fB(3)\fR
.RE
.\}
.sp
-.sp
-\fB1. \fRcreates a new branch
+.TS
+tab(:);
+r lw(\n(.lu*75u/100u).
+\fB1.\fR\h'-2n':T{
+creates a new branch
\fBfoo\fR, which refers to commit
\fBf\fR, and then updates
\fBHEAD\fR
@@ -690,19 +693,22 @@ to refer to branch
\fBfoo\fR\&. In other words, we\(cqll no longer be in detached
\fBHEAD\fR
state after this command\&.
-.br
-\fB2. \fRsimilarly creates a new branch
+T}
+\fB2.\fR\h'-2n':T{
+similarly creates a new branch
\fBfoo\fR, which refers to commit
\fBf\fR, but leaves
\fBHEAD\fR
detached\&.
-.br
-\fB3. \fRcreates a new tag
+T}
+\fB3.\fR\h'-2n':T{
+creates a new tag
\fBfoo\fR, which refers to commit
\fBf\fR, leaving
\fBHEAD\fR
detached\&.
-.br
+T}
+.TE
.sp
If we have moved away from commit \fBf\fR, then we must first recover its object name (typically by using git reflog), and then we can create a reference to it\&. For example, to see the last two commits to which \fBHEAD\fR referred, we can use either of these commands:
.sp
@@ -738,15 +744,21 @@ $ git checkout hello\&.c \fB(3)\fR
.RE
.\}
.sp
-.sp
-\fB1. \fRswitch branch
-.br
-\fB2. \fRtake a file out of another commit
-.br
-\fB3. \fRrestore
+.TS
+tab(:);
+r lw(\n(.lu*75u/100u).
+\fB1.\fR\h'-2n':T{
+switch branch
+T}
+\fB2.\fR\h'-2n':T{
+take a file out of another commit
+T}
+\fB3.\fR\h'-2n':T{
+restore
\fBhello\&.c\fR
from the index
-.br
+T}
+.TE
.sp
If you want to check out \fIall\fR C source files out of the index, you can say
.sp