Skip to content

Instantly share code, notes, and snippets.

@migueltg
Last active June 6, 2019 10:22
Show Gist options
  • Save migueltg/eb874af88dd5c08587f6e039a29f83eb to your computer and use it in GitHub Desktop.
Save migueltg/eb874af88dd5c08587f6e039a29f83eb to your computer and use it in GitHub Desktop.
Run git pull over all subdirectories
#! /usr/bin/env bash
find . -type d -depth 2 -exec echo git --git-dir={}/.git --work-tree=$PWD/{} status \;
find . -type d -depth 2 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment