Projekt

Allgemein

Profil

Feature #624 » convert3.sh

Maximilian Seesslen, 18.03.2025 17:03

 
1
#!/bin/bash
2

    
3
set -e -u
4
set FILTER_BRANCH_SQUELCH_WARNING=0
5

    
6
rm -rf data
7
mkdir -p data
8

    
9
cd data
10

    
11
git clone /data/srv/git/canhub.bck canhub
12
cd canhub
13

    
14
# git filter-branch --env-filter'
15
#    if test "$GIT_AUTHOR_EMAIL" = "maximilian.seesslen@ifm.com"
16
#    then
17
#	GIT_AUTHOR_EMAIL=mes@seesslen.net
18
#    fi
19
#' -- --all
20

    
21
# Erzeugt viele refs
22
git-filter-repo --force \
23
    --email-callback 'return email.replace(b"maximilian.seesslen@ifm.com", b"mes@seesslen.net")' \
24
    --replace-refs update-no-add
25

    
26
git-filter-repo --force \
27
    --email-callback 'return email.replace(b"mes@seesslen.net", b"dev@seesslen.net")' \
28
    --replace-refs update-no-add
29

    
30
git remote add origin /data/srv/git/canhub
31
git push --all -f
32
git push --tags -f
33

    
34
#git remote set-url origin /srv/git/canhub.git
35

    
36
echo "[$0] fin."
37

    
38
#---fin------------------------------------------------------------------------
    (1-1/1)