Skip to content

Instantly share code, notes, and snippets.

Harry Gallagher harrygallagher4

Block or report user

Report or block harrygallagher4

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am harrygallagher4 on github.
  • I am harryg (https://keybase.io/harryg) on keybase.
  • I have a public key ASC0pmQNZH9F4R01u2XJgTh1_Qi7Cfid4hpDzTAvQO-yBQo

To claim this, I am signing this object:

@harrygallagher4
harrygallagher4 / git-update.sh
Last active Oct 13, 2019
bash one-liner to pull all git repositories in the current directory
View git-update.sh
# most of this is sourced from stackoverflow answers
# git diff checks if the current directory is clean
# git remote checks if there is even a remote repo to pull from
ls | xargs -I{} sh -c '[[ -d {}/.git ]] && [[ $(git -C {} diff --shortstat 2> /dev/null | tail -n1) == "" ]] && [[ $(git -C {} remote) != "" ]] && echo {}: && git -C {} pull'
You can’t perform that action at this time.