Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you identify yourself to git then when you do commits they will appear against your username.
For more information see Identify yourself to git
And if you are committing a patch some one else has submitted you can give them the credit by following the instructions at Commit messages - providing history and credit