DEV Community


Morning routine - updating git repos

Simon Reynolds
Originally published at on ・1 min read
  • Get to work
  • Clock in
  • Make coffee
  • Fetch latest changes from git.... Morning routine - updating git repos

Going through a half dozen repositories that I regularly interact with involves far more typing than I care to do repeatedly.

What I want is to cycle through each repository and do the following

  • git fetch --prune
  • If I'm on the default branch (usually master or develop) and have no local changes then just git pull straight away

Sounds perfect for automation! PowerShell to the rescue, leaving time to savour the coffee

Discussion (0)