Skip to content

Commit 171d069

Browse files
authored
Merge pull request #884 from elonderin/fix-squash-help
Updates git-squash.md: fixes help which was unclear and had remnants …
2 parents 317eea6 + 6d9f861 commit 171d069

File tree

6 files changed

+32
-22
lines changed

6 files changed

+32
-22
lines changed

man/git-extras.1

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "GIT\-EXTRAS" "1" "September 2020" "" "Git Extras"
4+
.TH "GIT\-EXTRAS" "1" "October 2020" "" "Git Extras"
55
.
66
.SH "NAME"
77
\fBgit\-extras\fR \- Awesome GIT utilities
@@ -210,7 +210,7 @@ Change the default branch to \fB$BRANCH\fR (defaut to \fBmaster\fR)\.
210210
\fBgit\-show\-unmerged\-branches(1)\fR Show unmerged branches
211211
.
212212
.IP "\(bu" 4
213-
\fBgit\-squash(1)\fR Import changes from a branch
213+
\fBgit\-squash(1)\fR squash N last changes up to a ref\'ed commit
214214
.
215215
.IP "\(bu" 4
216216
\fBgit\-stamp(1)\fR Stamp the last commit message

man/git-extras.html

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/git-extras.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ git-extras(1) -- Awesome GIT utilities
8585
- **git-show-merged-branches(1)** Show merged branches
8686
- **git-show-tree(1)** show branch tree of commit history
8787
- **git-show-unmerged-branches(1)** Show unmerged branches
88-
- **git-squash(1)** Import changes from a branch
88+
- **git-squash(1)** squash N last changes up to a ref'ed commit
8989
- **git-stamp(1)** Stamp the last commit message
9090
- **git-standup(1)** Recall the commit history
9191
- **git-summary(1)** Show repository summary

man/git-squash.1

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
.\" generated with Ronn/v0.7.3
22
.\" http://github.com/rtomayko/ronn/tree/0.7.3
33
.
4-
.TH "GIT\-SQUASH" "1" "November 2019" "" "Git Extras"
4+
.TH "GIT\-SQUASH" "1" "October 2020" "" "Git Extras"
55
.
66
.SH "NAME"
7-
\fBgit\-squash\fR \- Import changes from a branch
7+
\fBgit\-squash\fR \- squash N last changes up to a ref\'ed commit
88
.
99
.SH "SYNOPSIS"
1010
\fBgit\-squash\fR [<\-\-squash\-msg>] <source\-branch|commit ref> [<commit\-message>]
1111
.
1212
.SH "DESCRIPTION"
13-
Produce the working tree and index state as if a real merge happened without the commit or merge marks\.
13+
Squash the N last changes in the current branch, where N is the range of commits from the given ref up to HEAD\.
1414
.
1515
.SH "OPTIONS"
1616
<source\-branch>
@@ -31,12 +31,13 @@ Commit the squash result with the concatenated squashed committed messages\. Thi
3131
<commit\-message>
3232
.
3333
.P
34-
If commit\-message is given, commit the squash result\.
34+
If commit\-message is given, commit the squashed result, otherwise the squash remains just added to the index and is not committed\.
3535
.
3636
.SH "EXAMPLES"
3737
.
3838
.nf
3939

40+
# squash changes and follow up with separate commit step
4041
$ git squash my\-other\-branch
4142
Updating a2740f5\.\.533b19c
4243
Fast\-forward
@@ -45,7 +46,10 @@ Squash commit \-\- not updating HEAD
4546
1 file changed, 1 insertion(+)
4647
$ git commit \-m "New commit without a real merge"
4748

49+
# squash and commit with given message
4850
$ git squash HEAD~3 "Commit message"
51+
52+
# squash and commit and concatenate all messages
4953
$ git squash \-\-squash\-msg @~3
5054
.
5155
.fi

man/git-squash.html

+11-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/git-squash.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
git-squash(1) -- Import changes from a branch
1+
git-squash(1) -- squash N last changes up to a ref'ed commit
22
=============================================
33

44
## SYNOPSIS
@@ -7,8 +7,7 @@ git-squash(1) -- Import changes from a branch
77

88
## DESCRIPTION
99

10-
Produce the working tree and index state as if a real merge happened without
11-
the commit or merge marks.
10+
Squash the N last changes in the current branch, where N is the range of commits from the given ref up to HEAD.
1211

1312
## OPTIONS
1413

@@ -27,10 +26,11 @@ git-squash(1) -- Import changes from a branch
2726

2827
&lt;commit-message&gt;
2928

30-
If commit-message is given, commit the squash result.
29+
If commit-message is given, commit the squashed result, otherwise the squash remains just added to the index and is not committed.
3130

3231
## EXAMPLES
3332

33+
# squash changes and follow up with separate commit step
3434
$ git squash my-other-branch
3535
Updating a2740f5..533b19c
3636
Fast-forward
@@ -39,7 +39,10 @@ git-squash(1) -- Import changes from a branch
3939
1 file changed, 1 insertion(+)
4040
$ git commit -m "New commit without a real merge"
4141

42+
# squash and commit with given message
4243
$ git squash HEAD~3 "Commit message"
44+
45+
# squash and commit and concatenate all messages
4346
$ git squash --squash-msg @~3
4447

4548
## AUTHOR

0 commit comments

Comments
 (0)