8 lines
191 B
Bash
Executable file
8 lines
191 B
Bash
Executable file
#!/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" .
|