# git push question

2 messages from 2010-03-07 to 2010-03-07. Participants: Mahesh Vaidya, BJ Hargrave.
Thread: https://gitlist.dev/t/22937

## Mahesh Vaidya, 2010-03-07 11:41

Subject: git push question
Message-ID: <b42431c81003070341u4a89578aw4357e7aef84ffb61@mail.gmail.com>
URL: https://gitlist.dev/e/b42431c81003070341u4a89578aw4357e7aef84ffb61%40mail.gmail.com

```
   Hi

   I am asked to explore GiT as version control tool by my employer.

   I have discovered that one can set up property like
   "git config user.name piglet "
and commit will show this fictitious name instead real name forvaidya@gmail.com

   How do I ensure that a correct name is stuck at the time
receive-pack operation when user pushes changes to auth repository

-Mahesh

```

## BJ Hargrave, 2010-03-07 11:52

Subject: Re: git push question
Message-ID: <00512306-B7AE-4A63-B5DD-492F3720A8CC@bjhargrave.com>
URL: https://gitlist.dev/e/00512306-B7AE-4A63-B5DD-492F3720A8CC%40bjhargrave.com
In-Reply-To: <b42431c81003070341u4a89578aw4357e7aef84ffb61@mail.gmail.com>

```
On Mar 7, 2010, at 06:41 , Mahesh Vaidya wrote:

>    I have discovered that one can set up property like
>    "git config user.name piglet "
> and commit will show this fictitious name instead real name forvaidya@gmail.com
> 
>    How do I ensure that a correct name is stuck at the time
> receive-pack operation when user pushes changes to auth repository

You can write a pre-receive hook, which runs on the remote repository, to validate the all incoming commits have recognized committer names/e-mail addresses. If they don't, the hook can reject the receive-pack.

-- 

BJ

```
