9 lines
191 B
Text
9 lines
191 B
Text
|
#!/bin/bash
|
||
|
|
||
|
DESTBRANCH=$1
|
||
|
git checkout -b tmp
|
||
|
git branch -f ${DESTBRANCH:-master} tmp
|
||
|
git checkout ${DESTBRANCH:-master}
|
||
|
git branch -d tmp
|
||
|
git commit -m "Merged detached head into master" .
|