Skip to content

Instantly share code, notes, and snippets.

Last active May 13, 2021
What would you like to do?
git eject
# Bails on current working branch and switches to main
# Install: Place this script anywhere that is in your $PATH and make it executable (chmod +x)
BRANCH_TO_EJECT=$(git rev-parse --abbrev-ref HEAD)
git reset HEAD --hard
git checkout main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment