Parent directory

gdone

379 bytes
 1# vim: ft=zsh
 2# Update and switch to master and delete current branch
 3
 4current=$(git branch --show-current)
 5
 6if [ "$current" == "$(git_main_branch)" ]; then
 7	echo "Cannot delete $(git_main_branch) branch"
 8	return 1
 9fi
10
11git fetch --all --prune --jobs=10
12git branch -f $(git_main_branch) origin/$(git_main_branch)
13git switch $(git_main_branch)
14git branch -D $current
15unset current