DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Simon Reynolds
Simon Reynolds

Posted on • Originally published at simonreynolds.ie on

Morning routine - updating git repos

  • 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

Top comments (0)

🌚 Browsing with dark mode makes you a better developer.

It's a scientific fact.