https://help.github.com/en/github/using-git/caching-your-github-password-in-git
# Set git to use the credential memory cache
git config --global credential.helper cache
# Set the cache to timeout after 1 hour (setting is in seconds)
git config --global credential.helper 'cache --timeout=3600'
# this clears it after work is done
git config --global --unset credential.helper
https://superuser.com/questions/44787/looping-through-subdirectories-and-running-a-command-in-each
for dir in ~/catkin_ws/src/*; do (cd "$dir" && git checkout 1.4.0); done