Skip to content

Instantly share code, notes, and snippets.

@jtrobman
Created October 30, 2015 20:09
Show Gist options
  • Save jtrobman/210a331949ecc623ff2e to your computer and use it in GitHub Desktop.
Save jtrobman/210a331949ecc623ff2e to your computer and use it in GitHub Desktop.
Set your git email on a bunch of directories at once.
#!/bin/bash
# FIRST
# cd to the directory where you keep your codez
# SECOND
# loop over all the directories that contain a git repo
find . -name '.git' -type d -prune | while read d; do
cd $d/..
git config user.email "[email protected]"
cd $OLDPWD
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment