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