File: git-squash.md

package info (click to toggle)
git-extras 4.2.0-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,632 kB
  • ctags: 191
  • sloc: sh: 2,388; makefile: 87
file content (49 lines) | stat: -rw-r--r-- 1,124 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
git-squash(1) -- Import changes from a branch
=============================================

## SYNOPSIS

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

## DESCRIPTION

  Produce the working tree and index state as if a real merge happened without
  the commit or merge marks.

## OPTIONS

  <source-branch>

  Branch to squash on the actual 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.

  &lt;commit-message&gt;

  If commit-message is given, commit the squash result.

## EXAMPLES

    $ 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"

    $ git squash HEAD~3 "Commit message"

## AUTHOR

Written by Jesus Espino &lt;<jespinog@gmail.com>&gt;

## REPORTING BUGS

&lt;<https://github.com/tj/git-extras/issues>&gt;

## SEE ALSO

&lt;<https://github.com/tj/git-extras>&gt;