Comment je ne peux pas changer le nom et e-mail pour toute mon histoire commits mais et commiter spécifique ..git changer toute l'histoire des noms de committers et email pour committers spécifique
quelque chose comme, allcommits foreach si committer_name = « Hugo Casa " changement: committer_name committer_email author_name author_email
et après cela, pousser et actualiser les données de l'histoire.
s'il vous plaît HELPPP je recherche et trouvé ceci:
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "production251" ];
then
GIT_COMMITTER_NAME="Hugo Casanova";
GIT_AUTHOR_NAME="Hugo Casanova";
GIT_COMMITTER_EMAIL="hugo.casanova.ibusplus.com";
GIT_AUTHOR_EMAIL="hugo.casanova.ibusplus.com";
git commit-tree "[email protected]";
else
git commit-tree "[email protected]";
fi' HEAD
git filter-branch --env-filter '
oldname="(old name)"
oldemail="(old email)"
newname="(new name)"
newemail="(new email)"
[ "$GIT_AUTHOR_EMAIL" = "$oldemail" ] && GIT_AUTHOR_EMAIL="$newemail"
[ "$GIT_COMMITTER_EMAIL" = "$oldemail" ] && GIT_COMMITTER_EMAIL="$newemail"
[ "$GIT_AUTHOR_NAME" = "$oldname" ] && GIT_AUTHOR_NAME="$newname"
[ "$GIT_COMMITTER_NAME" = "$oldname" ] && GIT_COMMITTER_NAME="$newname"
' HEAD
mais ... après: écriture: git log --pretty format = "% un" | sort -u et le nom du spectacle production251 ..
j'ai trouvé un nouveau code:
git filtre-branche --force --env filtre ' if [ "$ GIT_COMMITTER_NAME" = dmiguel »]; puis GIT_COMMITTER_NAME = "Diana Miguel", GIT_COMMITTER_EMAIL = "[email protected]"; GIT_AUTHOR_NAME = "Diana Miguel", GIT_AUTHOR_EMAIL = "[email protected]", fi » - - -all
c'est bien? ou pas? après avoir mis ce code sur ter minal (ubuntu), besoin d'un peu de code supplémentaire, pousser ou quelque chose?
Quel est le code complet pour ce cas? aidez s'il vous plaît! –
J'ai trouvé un nouveau code: –