Skip to content
A script to update all git repositories in current folder
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A script to update all git repositories in the current folder


Installing the script is very easy. To make it easy to use and automatically updated without any user action, we will clone it among the other Git projects and create a symlink in the parent folder. It will then update all child folders including itself.

The following schema shows the update script among your Git repositories.

+-- One-git-folder/
+-- Git-Repo-Update/
+-- Another-git-folder/
+-- update
  1. Let's begin. First, move to your usual workspace containing all your Git projects and clone the repo.
git clone
  1. Move to the cloned repo:
cd Git-Repo-Update
  1. Make the script executable:
chmod +x
  1. Move to the parent folder containing all git repositories to update
cd ..
  1. Create a symlink:
ln -s Git-Repo-Update/ update

That's all!


Usual update process is the following: It will first do a git stash to put your work in progress on a side, then a git pull --rebase on your master branch and go back to your current branch if you were not on master and finally a git stash pop to put back your work in progress.

To update all the repositories contained in your workspace asking for a confirmation every time.


Or if you're sure to update every repo, you can force to yes:

./update -f

To prune remotes at the same time (does additionnal fetch request):

./update -p
You can’t perform that action at this time.