Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.