mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
10 lines
267 B
Bash
Executable file
10 lines
267 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# TODO: warn on master
|
|
|
|
branch=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
|
|
msg=${1-Squashed $branch}
|
|
git checkout -b squash-tmp master \
|
|
&& git merge --squash $branch \
|
|
&& git commit -m $msg \
|
|
&& git branch -M $branch |