Skip to content

Instantly share code, notes, and snippets.

@najlepsiwebdesigner
Last active May 15, 2020 12:33
Show Gist options
  • Save najlepsiwebdesigner/9eee7adfb9a2a5c9a21c802a06138e42 to your computer and use it in GitHub Desktop.
Save najlepsiwebdesigner/9eee7adfb9a2a5c9a21c802a06138e42 to your computer and use it in GitHub Desktop.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment