Skip to content

Instantly share code, notes, and snippets.

@mariomui
Created March 1, 2022 09:10
Show Gist options
  • Save mariomui/632929f63146b6f151fb8fa9be5f1956 to your computer and use it in GitHub Desktop.
Save mariomui/632929f63146b6f151fb8fa9be5f1956 to your computer and use it in GitHub Desktop.
Toggle between git personal and git workname, cuz i want to not be restricted
toggle = "!sh -c 'CONFIG_NAME=$(git config user.name) && if [ $CONFIG_NAME = 'MY_PERSONAL_NAME' ]; then git config user.email MY_WORK_EMAIL\
&& git config user.name MY_WORK_NAME;\
else git config user.email PERSONAL_EMAIL\
&& git config user.name PERSONAL_NAME;fi && echo $(git config user.name)'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment