git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/bin/git-update-all
blob: d3f6033105755a86d37e7a9fd8bf6c8c216536b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash

GITBIN='/usr/bin/git'

# 1. Pull the current branch and also tags, and prune references vanished from remote
"$GITBIN" pull -tpf || exit 110
# 2. Pull all branches existing locally
mybr="$("$GITBIN" branch --show-current)"
while read -r branch
do
	(
		printf '\033[1m\033[3mSwitching to %b.\033[0m\n' "$branch"
		"$GITBIN" switch "$branch" &&\
		"$GITBIN" pull &&\
		"$GITBIN" switch "$mybr"
	)
done < <("$GITBIN" branch --list|awk '{print $NF}'|grep -vP "^${mybr}\$")
repo-template/commit/site-modules/adhoc?h=1.1.0-lnde&id=061ca3be10e05e39810afd350737b0acaf90014d'>Create nix.jsonMarc McKinley 2021-05-121-0/+4 | * Rename winscript.ps1 to win.ps1Marc McKinley 2021-05-121-0/+0 | * Rename nixscript.sh to nix.shMarc McKinley 2021-05-121-0/+0 | * Rename script.sh to nixscript.shMarc McKinley 2021-05-121-0/+0 | * Rename script.ps1 to winscript.ps1Marc McKinley 2021-05-121-0/+0 | * Create myplan.ppMarc McKinley 2021-05-121-0/+9 | * Create script.ps1Marc McKinley 2021-05-121-0/+1 | * adding script.shMarc McKinley 2021-05-121-0/+3