Skip to content

Instantly share code, notes, and snippets.

View vitalii-skl's full-sized avatar
🌞

vitalii-skl

🌞
View GitHub Profile
@vitalii-skl
vitalii-skl / changeemail.sh
Created October 2, 2025 15:32
Changing an email and name in commit history
#!/bin/bash
git filter-branch -f --env-filter '
OLD_EMAIL="old.email@mail.com"
CORRECT_NAME="correct name"
CORRECT_EMAIL="correct.email@mail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
#!/bin/sh
# list all repo, and parse their names, and place into 'repos' variable
repos=$(
curl \
-X GET \
-H 'Authorization: Bearer TOKEN' \
-H 'Accept: application/json' \
'https://api.github.com/user/repos?visibility=private' \