Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change commit author on gitlab?

Tags:

git

gitlab

I making project for my friend but after few commits i see the problem. I thinked if im log in on his account it will be created like him. But it was created my other author(me). Can i change this on gitlab ? If is options to change it without changing data commits.

like image 537
Kamilex97 Avatar asked Mar 05 '23 20:03

Kamilex97


1 Answers

Yes you can. Clone the repo locally, then use filter branch

 git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "John Doe" ];
  then export GIT_AUTHOR_NAME="My Friend"; export [email protected];
  fi; git commit-tree "$@"'
like image 161
Adam Dymitruk Avatar answered Mar 23 '23 10:03

Adam Dymitruk