Skip to content

Instantly share code, notes, and snippets.

View iagoalonsomrf's full-sized avatar

Iago Alonso iagoalonsomrf

View GitHub Profile
@iagoalonsomrf
iagoalonsomrf / delete-merged-branch.sh
Last active March 27, 2025 10:50
Delete your working branch after it's merged, and pull the default branch
#!/usr/bin/env bash
if [ -z "$1" ]
then
DEFAULT_BRANCH="master"
else
DEFAULT_BRANCH="$1"
fi
CURRENT_BRANCH=$(git branch --show-current)