myshellconfig/bin/git-mergedetachedheadto
2023-03-07 00:29:40 +01:00

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