threads / patch / 37950

patchgittutorial: fix output of 'git status'

Subject: [PATCH] gittutorial: fix output of 'git status'

## tl;dr

2 messages between Nov 13, 2014 and Nov 13, 2014. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

stefan.naewe@atlas-elektronik.com· Nov 13, 2014, 10:40 UTC · lore
From: Stefan Naewe <stefan.naewe@gmail.com>
'git status' doesn't output leading '#'s these days.
Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
---
 Documentation/gittutorial-2.txt | 23 ++++++++++++-----------
 Documentation/gittutorial.txt   | 17 +++++++++--------
 2 files changed, 21 insertions(+), 19 deletions(-)
Show changes to 2 files +21 −19

Documentation/gittutorial-2.txt, Documentation/gittutorial.txt

diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt
index 3109ea8..1901af7 100644
--- a/Documentation/gittutorial-2.txt
+++ b/Documentation/gittutorial-2.txt
@@ -368,17 +368,18 @@ situation:
 
 ------------------------------------------------
 $ git status
-# On branch master
-# Changes to be committed:
-#   (use "git reset HEAD <file>..." to unstage)
-#
-#       new file: closing.txt
-#
-# Changes not staged for commit:
-#   (use "git add <file>..." to update what will be committed)
-#
-#       modified: file.txt
-#
+On branch master
+Changes to be committed:
+  (use "git reset HEAD <file>..." to unstage)
+
+        new file:   closing.txt
+
+Changes not staged for commit:
+  (use "git add <file>..." to update what will be committed)
+  (use "git checkout -- <file>..." to discard changes in working directory)
+
+        modified:   file.txt
+
 ------------------------------------------------
 
 Since the current state of closing.txt is cached in the index file,
diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
index 8262196..8715244 100644
--- a/Documentation/gittutorial.txt
+++ b/Documentation/gittutorial.txt
@@ -107,14 +107,15 @@ summary of the situation with 'git status':
 
 ------------------------------------------------
 $ git status
-# On branch master
-# Changes to be committed:
-#   (use "git reset HEAD <file>..." to unstage)
-#
-#	modified:   file1
-#	modified:   file2
-#	modified:   file3
-#
+On branch master
+Changes to be committed:
+Your branch is up-to-date with 'origin/master'.
+  (use "git reset HEAD <file>..." to unstage)
+
+        modified:   file1
+        modified:   file2
+        modified:   file3
+
 ------------------------------------------------
 
 If you need to make any further adjustments, do so now, and then add any
-- 
1.9.2.msysgit.0.2270.g8768113
Junio C Hamano· Nov 13, 2014, 16:38 UTC · re: stefan.naewe@atlas-elektronik.com · lore

Re: [PATCH] gittutorial: fix output of 'git status'

<stefan.naewe@atlas-elektronik.com> writes:
Show 6 quoted lines
> From: Stefan Naewe <stefan.naewe@gmail.com>
>
> 'git status' doesn't output leading '#'s these days.
>
> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
> ---
Thanks, will queue.
Show 66 quoted lines
>  Documentation/gittutorial-2.txt | 23 ++++++++++++-----------
>  Documentation/gittutorial.txt   | 17 +++++++++--------
>  2 files changed, 21 insertions(+), 19 deletions(-)
>
> diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt
> index 3109ea8..1901af7 100644
> --- a/Documentation/gittutorial-2.txt
> +++ b/Documentation/gittutorial-2.txt
> @@ -368,17 +368,18 @@ situation:
>  
>  ------------------------------------------------
>  $ git status
> -# On branch master
> -# Changes to be committed:
> -#   (use "git reset HEAD <file>..." to unstage)
> -#
> -#       new file: closing.txt
> -#
> -# Changes not staged for commit:
> -#   (use "git add <file>..." to update what will be committed)
> -#
> -#       modified: file.txt
> -#
> +On branch master
> +Changes to be committed:
> +  (use "git reset HEAD <file>..." to unstage)
> +
> +        new file:   closing.txt
> +
> +Changes not staged for commit:
> +  (use "git add <file>..." to update what will be committed)
> +  (use "git checkout -- <file>..." to discard changes in working directory)
> +
> +        modified:   file.txt
> +
>  ------------------------------------------------
>  
>  Since the current state of closing.txt is cached in the index file,
> diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt
> index 8262196..8715244 100644
> --- a/Documentation/gittutorial.txt
> +++ b/Documentation/gittutorial.txt
> @@ -107,14 +107,15 @@ summary of the situation with 'git status':
>  
>  ------------------------------------------------
>  $ git status
> -# On branch master
> -# Changes to be committed:
> -#   (use "git reset HEAD <file>..." to unstage)
> -#
> -#	modified:   file1
> -#	modified:   file2
> -#	modified:   file3
> -#
> +On branch master
> +Changes to be committed:
> +Your branch is up-to-date with 'origin/master'.
> +  (use "git reset HEAD <file>..." to unstage)
> +
> +        modified:   file1
> +        modified:   file2
> +        modified:   file3
> +
>  ------------------------------------------------
>  
>  If you need to make any further adjustments, do so now, and then add any

← back to recent threads