diff --git a/man/git-extras.md b/man/git-extras.md index eeea50a..235c9c7 100644 --- a/man/git-extras.md +++ b/man/git-extras.md @@ -85,7 +85,7 @@ git-extras(1) -- Awesome GIT utilities - **git-show-merged-branches(1)** Show merged branches - **git-show-tree(1)** show branch tree of commit history - **git-show-unmerged-branches(1)** Show unmerged branches - - **git-squash(1)** Import changes from a branch + - **git-squash(1)** squash N last changes up to a ref'ed commit - **git-stamp(1)** Stamp the last commit message - **git-standup(1)** Recall the commit history - **git-summary(1)** Show repository summary diff --git a/man/git-squash.1 b/man/git-squash.1 index 93923a3..24c9682 100644 --- a/man/git-squash.1 +++ b/man/git-squash.1 @@ -1,16 +1,16 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "GIT\-SQUASH" "1" "November 2019" "" "Git Extras" +.TH "GIT\-SQUASH" "1" "October 2020" "" "Git Extras" . .SH "NAME" -\fBgit\-squash\fR \- Import changes from a branch +\fBgit\-squash\fR \- squash N last changes up to a ref\'ed commit . .SH "SYNOPSIS" \fBgit\-squash\fR [<\-\-squash\-msg>] [] . .SH "DESCRIPTION" -Produce the working tree and index state as if a real merge happened without the commit or merge marks\. +Squash the N last changes in the current branch, where N is the range of commits from the given ref up to HEAD\. . .SH "OPTIONS" @@ -31,12 +31,13 @@ Commit the squash result with the concatenated squashed committed messages\. Thi . .P -If commit\-message is given, commit the squash result\. +If commit\-message is given, commit the squashed result, otherwise the squash remains just added to the index and is not committed\. . .SH "EXAMPLES" . .nf +# squash changes and follow up with separate commit step $ git squash my\-other\-branch Updating a2740f5\.\.533b19c Fast\-forward @@ -45,7 +46,10 @@ Squash commit \-\- not updating HEAD 1 file changed, 1 insertion(+) $ git commit \-m "New commit without a real merge" +# squash and commit with given message $ git squash HEAD~3 "Commit message" + +# squash and commit and concatenate all messages $ git squash \-\-squash\-msg @~3 . .fi diff --git a/man/git-squash.html b/man/git-squash.html index 166eaf2..c7cb344 100644 --- a/man/git-squash.html +++ b/man/git-squash.html @@ -3,7 +3,7 @@ - git-squash(1) - Import changes from a branch + git-squash(1) - squash N last changes up to a ref'ed commit