Kamilex97
Kamilex97

Reputation: 41

How to change commit author on 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.

Upvotes: 4

Views: 5694

Answers (1)

Adam Dymitruk
Adam Dymitruk

Reputation: 129762

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 "$@"'

Upvotes: 7

Related Questions