Using PowerShell to update all repositories in a folder

When working on different projects, with different repo’s, etc. I often find myself forgetting to update a repository prior to making modifications (especially when not using VS Code to quickly change something). Therefor I wrote a small script which will loop through all folders in the current working directory, find all GIT folders/repositories, performs a git pull in each one of them and then outputs the status + current branch to the console. You can find the script in my blogpost at

Example of the output:

/Users/user/azure/repo1 – master – Already up to date.

/Users/user/azure/repo2 – master – Already up to date.

/Users/user/azure/repo3 – develop – Already up to date.

submitted by /u/bazat89
[link] [comments]

Leave a Reply