Daniel Hiller

Geek, programmer, father
Run multiple Intellij version installations on linux
All posts
Git aliases continued

Update all git repos via cmd line in a subdir

2017-08-17

git osx 

This one is just for me so I don’t forget this “one-liner”. Updates all git repositories in direct subdirectories. Works on OS X :)

cwd=$(pwd); for dir in $(find . -type d -not -name '\.*' -maxdepth 1 -print); \
    (current_dir="$cwd/${dir##./}"; echo "Updating $current_dir"; \
    cd $current_dir; git pull --all;)
Related posts:

Run multiple Intellij version installations on linux
All posts
Git aliases continued

Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Last update on 2018-04-04. Built by dhiller using Atom (editor), Jekyll (site builder), OneDark vivid (syntax highlighting theme), Webjeda (related posts), Disqus (discussions), Github Pages (hosting), Cloudflare (DNS).