From e5a0201a7132d8a2843cfcac5d80c4b7b2b150cf Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Wed, 6 Jan 2021 12:36:06 -0500 Subject: [PATCH 1/4] git-stripspace: add page --- pages/common/git-stripspace.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/common/git-stripspace.md diff --git a/pages/common/git-stripspace.md b/pages/common/git-stripspace.md new file mode 100644 index 0000000000000..82784cd7cbc99 --- /dev/null +++ b/pages/common/git-stripspace.md @@ -0,0 +1,16 @@ +# git stripspace + +> Read text, such as commit messages, notes, tags and branch descriptions, from the standard input and clean it in the manner used by Git. +> More information: . + +- Trim whitespace from a file: + +`cat {{path/to/file}} | git stripspace` + +- Trim whitespace and git comments from a file: + +`cat {{path/to/file}} | git stripspace --strip-comments` + +- Convert all lines in a file into git comments: + +`cat {{path/to/file}} | git stripspace --comment-lines` From 842f1db8a2499f3cd5b5ec799e04e6a297c27ef9 Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Wed, 6 Jan 2021 21:08:10 -0500 Subject: [PATCH 2/4] Update pages/common/git-stripspace.md Co-authored-by: Starbeamrainbowlabs --- pages/common/git-stripspace.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/git-stripspace.md b/pages/common/git-stripspace.md index 82784cd7cbc99..761f84b582def 100644 --- a/pages/common/git-stripspace.md +++ b/pages/common/git-stripspace.md @@ -13,4 +13,4 @@ - Convert all lines in a file into git comments: -`cat {{path/to/file}} | git stripspace --comment-lines` +`git stripspace --comment-lines < {{path/to/file}}` From a552e46eefb1ca3a2e7adb286287e0b00874eac1 Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Wed, 6 Jan 2021 21:09:35 -0500 Subject: [PATCH 3/4] Update pages/common/git-stripspace.md Co-authored-by: Starbeamrainbowlabs --- pages/common/git-stripspace.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/git-stripspace.md b/pages/common/git-stripspace.md index 761f84b582def..75bd075feb808 100644 --- a/pages/common/git-stripspace.md +++ b/pages/common/git-stripspace.md @@ -1,6 +1,6 @@ # git stripspace -> Read text, such as commit messages, notes, tags and branch descriptions, from the standard input and clean it in the manner used by Git. +> Read text (e.g. commit messages, notes, tags, and branch descriptions) from the standard input and clean it into the manner used by Git. > More information: . - Trim whitespace from a file: From 3409f1cea7cc7883b29ca0c65b931e1349d4e775 Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Thu, 7 Jan 2021 08:31:36 -0500 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Lucas Gabriel Schneider --- pages/common/git-stripspace.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/git-stripspace.md b/pages/common/git-stripspace.md index 75bd075feb808..3ca7aa82f29fc 100644 --- a/pages/common/git-stripspace.md +++ b/pages/common/git-stripspace.md @@ -7,10 +7,10 @@ `cat {{path/to/file}} | git stripspace` -- Trim whitespace and git comments from a file: +- Trim whitespace and Git comments from a file: `cat {{path/to/file}} | git stripspace --strip-comments` -- Convert all lines in a file into git comments: +- Convert all lines in a file into Git comments: `git stripspace --comment-lines < {{path/to/file}}`