GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GIT-SQUASH(1) Git Extras GIT-SQUASH(1)

git-squash - squash N last changes up to a ref´ed commit

git-squash [<--squash-msg>] <source-branch|commit ref> [<commit-message>]

Squash the N last changes in the current branch, where N is the range of commits from the given ref up to HEAD.

<source-branch>

Branch to squash on the current branch.

<commit reference> A commit reference (has to be from the current branch) can also be used as the first argument. A range of commits sha..HEAD will be squashed.

<--squash-msg>

Commit the squash result with the concatenated squashed committed messages. This option can not be used together with <commit-message>.

<commit-message>

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

# squash changes and follow up with separate commit step
$ git squash my-other-branch
Updating a2740f5..533b19c
Fast-forward
Squash commit -- not updating HEAD
 my-changed-file | 1 +
 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

Written by Jesús Espino <jespinog@gmail.com>

<https://github.com/tj/git-extras/issues>

<https://github.com/tj/git-extras>
October 2020

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.