Skip to content

Instantly share code, notes, and snippets.

View jgunnink's full-sized avatar
🎯
Focusing

JK Gunnink jgunnink

🎯
Focusing
View GitHub Profile
#!/bin/bash
set -e
GIT_CONFIG=$(git config --show-origin --get credential.helper)
if [[ ${GIT_CONFIG} == **osxkeychain** ]]; then
FILE=$(echo ${GIT_CONFIG} | awk '{print $1}' | sed s/'file:'//)
sudo sed -i.bak '/\[credential\]$/N; /\[credential\]/d' $(echo ${FILE})
fi