Inside the repository that you want to configure, run:
git config --local user.name "John Doe"
The --local parameter is optional, as it is the default.
Search Git Commands | More How Tos