OLD | NEW |
(Empty) | |
| 1 git-squash-branch(1) |
| 2 ==================== |
| 3 |
| 4 NAME |
| 5 ---- |
| 6 git-squash-branch - |
| 7 include::_git-squash-branch_desc.helper.txt[] |
| 8 |
| 9 SYNOPSIS |
| 10 -------- |
| 11 [verse] |
| 12 'git squash-branch' [-m <message>] |
| 13 |
| 14 DESCRIPTION |
| 15 ----------- |
| 16 |
| 17 `git squash-branch` is a simple helper command. It takes all the commits on the |
| 18 current branch from the 'merge_base' to HEAD, and reduces them to a single |
| 19 commit. The new commit will contain a summary of all the commits which were |
| 20 squashed, preceeded by a header message indicating that it's the result of a |
| 21 squash (or the message you pass on the command line.). |
| 22 |
| 23 Squashing branches is useful when trying to rebase-update over branches which |
| 24 were pushed to their upsteram (or committed by the 'Commit Queue'), and then |
| 25 conflicting changes landed in upstream on top of the push/commit. If you know |
| 26 that your branch was committed but linkgit:git-rebase-update[1] isn't able to |
| 27 automatically clean it, you can squash the troublesome branch before `git |
| 28 rebase-update`, and then when `git rebase-update` presents the conflict, you can |
| 29 verify that the conflict diff is what you expected (and then skip it with |
| 30 `git rebase --skip`). |
| 31 |
| 32 OPTIONS |
| 33 ------- |
| 34 |
| 35 -m <message>:: |
| 36 --message=<message>:: |
| 37 Optional message to use for the first line of the squashed commit. If omitted, |
| 38 it defaults to "git squash commit.". |
| 39 |
| 40 EXAMPLE |
| 41 ------- |
| 42 |
| 43 [subs="specialcharacters,quotes,attributes"] |
| 44 ---- |
| 45 [white]**$ git map** |
| 46 [white blue-background]##\*##{zwsp}[blue-background red]** 7dcfe47 ** [gre
en]##(##{zwsp}[aqua]**frozen_changes**{zwsp}[green]##)## [yellow]##2014-03-12##
\~ FREEZE.unindexed |
| 47 * [red]**4b0c180** [yellow]##2014-03-12## \~ modfile |
| 48 * [red]**59a7cca** [yellow]##2014-03-12## \~ a deleted file |
| 49 * [red]**6bec695** [green]##(##{zwsp}[red]##origin/master##{zwsp}[green]#
#)## [yellow]##2014-03-11## \~ Add neat feature [white]**<(frozen_changes)** |
| 50 * [red]**d15a38a** [yellow]##2014-03-11## \~ Epic README update |
| 51 * [red]**d559894** [green]##(##{zwsp}[lime]**master**{zwsp}[green]##)## [
yellow]##2014-03-11## \~ Important upstream change |
| 52 [red]##|## * [red]**9c311fd** [green]##(##{zwsp}[lime]**cool_feature**{zwsp
}[green]##)## [yellow]##2014-03-11## \~ Respond to CL comments |
| 53 [red]##|## [green]##|## * [red]**2a1eeb2** [green]##(##{zwsp}[lime]**subfeatu
re**{zwsp}[green]##)## [yellow]##2014-03-11## \~ integrate with CoolService |
| 54 [red]##|## [green]##|## * [red]**d777af6** [yellow]##2014-03-11## \~ slick co
mmenting action |
| 55 [red]##|## [green]##|/## |
| 56 [red]##|## * [red]**265803a** [yellow]##2014-03-11## \~ another improvement
[white]**<(subfeature)** |
| 57 [red]##|## * [red]**6d831ac** [green]##(##{zwsp}[fuchsia]**spleen_tag**{zws
p}[green]##)## [yellow]##2014-03-11## \~ Refactor spleen |
| 58 [red]##|## * [red]**82e74ab** [yellow]##2014-03-11## \~ Add widget |
| 59 [red]##|/## |
| 60 * [red]**d08c5b3** [green]##(##{zwsp}[lime]**bogus_noparent**{zwsp}[green
]##)## [yellow]##2014-03-11## \~ Wonderful beginnings [white]**<(cool_feature
)** |
| 61 [white]**$ git squash-branch "cool squash demo"** |
| 62 [white]**$ git map** |
| 63 [white blue-background]##*##{zwsp}[blue-background red]** 2c81508 ** [gree
n]##(##{zwsp}[aqua]**frozen_changes**{zwsp}[green]##)## [yellow]##2014-03-22## \
~ cool squash demo |
| 64 * [red]**6bec695** [green]##(##{zwsp}[red]##origin/master##{zwsp}[green]#
#)## [yellow]##2014-03-11## \~ Add neat feature [white]**<(frozen_changes)** |
| 65 * [red]**d15a38a** [yellow]##2014-03-11## \~ Epic README update |
| 66 * [red]**d559894** [green]##(##{zwsp}[lime]**master**{zwsp}[green]##)## [
yellow]##2014-03-11## \~ Important upstream change |
| 67 [red]##|## * [red]**9c311fd** [green]##(##{zwsp}[lime]**cool_feature**{zwsp
}[green]##)## [yellow]##2014-03-11## \~ Respond to CL comments |
| 68 [red]##|## [green]##|## * [red]**2a1eeb2** [green]##(##{zwsp}[lime]**subfeatu
re**{zwsp}[green]##)## [yellow]##2014-03-11## \~ integrate with CoolService |
| 69 [red]##|## [green]##|## * [red]**d777af6** [yellow]##2014-03-11## \~ slick co
mmenting action |
| 70 [red]##|## [green]##|/## |
| 71 [red]##|## * [red]**265803a** [yellow]##2014-03-11## \~ another improvement
[white]**<(subfeature)** |
| 72 [red]##|## * [red]**6d831ac** [green]##(##{zwsp}[fuchsia]**spleen_tag**{zws
p}[green]##)## [yellow]##2014-03-11## \~ Refactor spleen |
| 73 [red]##|## * [red]**82e74ab** [yellow]##2014-03-11## \~ Add widget |
| 74 [red]##|/## |
| 75 * [red]**d08c5b3** [green]##(##{zwsp}[lime]**bogus_noparent**{zwsp}[green
]##)## [yellow]##2014-03-11## ~ Wonderful beginnings [white]**<(cool_feature)
** |
| 76 ---- |
| 77 |
| 78 include::_aliases.txt[] |
| 79 |
| 80 ---- |
| 81 [alias] |
| 82 git squash = squash-branch |
| 83 ---- |
| 84 |
| 85 |
| 86 SEE ALSO |
| 87 -------- |
| 88 linkgit:git-rebase-update[1] |
| 89 |
| 90 include::_footer.txt[] |
| 91 |
| 92 // vim: ft=asciidoc: |
OLD | NEW |