One of the first things I do every morning is run git pull on every project I’ll be working on that day. This is to make sure that I am in sync with the rest of my team. It becomes tedious though when I am working with multiple repositories. To get around having to cd in and out of every git repo, I wrote this small one liner. It goes to every folder in the current directory and runs git pull.

git pull all repositories

#! /bin/bash
find . -type d -exec git -C "{}" pull 2&>; /dev/null \;

create a file in your workspace directory and name it Give it execute permissions (chmod 777 and run it every morning.

Leave a Reply

Your email address will not be published. Required fields are marked *