-1

how can I prevent of adding two author and commiter in github when make a commit. I have the same author and the same commiter person. I checked my global .config file and there are person info. How to remove from git commits one of them.

Reddi
  • 677
  • 6
  • 19
  • 4
    Possible duplicate of [How to change the commit author for one specific commit?](https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit) – René Höhle Feb 03 '19 at 19:40

1 Answers1

1

I apologize if I misunderstand your question - as I'm sure you realize, the phrasing is a bit unclear.

I think you're saying that the committer is always the same person as the author, and so you don't want to have the commit store both pieces of information. That is impossible; a commit always stores both an author and a committer. They can be, and often are, the same; but that's fine, and they still both have to be specified.

I'm not sure why this would be a problem. No meaningful amount of space is used, and it's handled automatically. Even if it doesn't help in any way for your repo today, if the project ever has multiple contributors then it can be important (e.g. if one contributor rebases another's commits); and, again, in the meantime it doesn't hurt anything.

If you need help configuring the two values so that they are the same / both correct, please refer to the git config documentation

Mark Adelsberger
  • 42,148
  • 4
  • 35
  • 52