Skip to content

Instantly share code, notes, and snippets.

@gokhansolak
gokhansolak / update_repos.sh
Last active July 30, 2020 09:18
Updates all repos in a folder. The user is prompted to choose the repos.
#!/usr/bin/env bash
# This script updates all git repos in the folder
# it resides. It does fetch, pull and push to the
# current branch of a repo. It shows the diff and
# asks user to commit if there are changes in the
# working copy. Put it in your workspace and run
# it using terminal, from any path. Press 'q' to
# skip long diff.
# It requires an execution permission (chmod +x)