# Reporting Bug in Git Version Control System

6 messages from 2016-10-24 to 2016-10-31. Participants: Yash Jain, Stefan Beller, Junio C Hamano, Pranit Bauva, Jakub Narębski.
Thread: https://gitlist.dev/t/44364

## Yash Jain, 2016-10-24 14:28

Subject: Reporting Bug in Git Version Control System
Message-ID: <CAN8fUZe4iWJCZYqBBDbNyPq1Dz7f4xvTNRVEZgg5AYN2NrKCbg@mail.gmail.com>
URL: https://gitlist.dev/e/CAN8fUZe4iWJCZYqBBDbNyPq1Dz7f4xvTNRVEZgg5AYN2NrKCbg%40mail.gmail.com

```
Hello,
I have two accounts on github("yj291197" and "yaki29").
Both the accounts have different gmail IDs("yj291197@gmail.com" and
"yashjain.lnm@gmail.com" respectively) but same passwords.
I used to use git for "yj291197" account and a few days earlier I made
this new account and used git commit to commit on "yaki29" but it
appeared as "yj291197" committed on "yaki29's" repo.
Then I pulled a request of that commit then it appeared "yaki29"
pulled a request with a commit of "yj291197".



And during this whole session I was signed in as "yaki29" on github.com .


Please reply ....

```

## Stefan Beller, 2016-10-24 18:23

Subject: Re: Reporting Bug in Git Version Control System
Message-ID: <CAGZ79ka+_CUxQjB2R-EEk2nKmc_rbj_m7884fLvU9+NgJ5gUug@mail.gmail.com>
URL: https://gitlist.dev/e/CAGZ79ka%2B_CUxQjB2R-EEk2nKmc_rbj_m7884fLvU9%2BNgJ5gUug%40mail.gmail.com
In-Reply-To: <CAN8fUZe4iWJCZYqBBDbNyPq1Dz7f4xvTNRVEZgg5AYN2NrKCbg@mail.gmail.com>

```
This is a Github issue, so ask Github support.

Or read up on .mailmap files.

On Mon, Oct 24, 2016 at 7:28 AM, Yash Jain <yashjain.lnm@gmail.com> wrote:
> Hello,
> I have two accounts on github("yj291197" and "yaki29").
> Both the accounts have different gmail IDs("yj291197@gmail.com" and
> "yashjain.lnm@gmail.com" respectively) but same passwords.
> I used to use git for "yj291197" account and a few days earlier I made
> this new account and used git commit to commit on "yaki29" but it
> appeared as "yj291197" committed on "yaki29's" repo.
> Then I pulled a request of that commit then it appeared "yaki29"
> pulled a request with a commit of "yj291197".
>
>
>
> And during this whole session I was signed in as "yaki29" on github.com .
>
>
> Please reply ....

```

## Junio C Hamano, 2016-10-24 18:32

Subject: Re: Reporting Bug in Git Version Control System
Message-ID: <xmqqzilt61jo.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqzilt61jo.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <CAGZ79ka+_CUxQjB2R-EEk2nKmc_rbj_m7884fLvU9+NgJ5gUug@mail.gmail.com>

```
Stefan Beller <sbeller@google.com> writes:

> On Mon, Oct 24, 2016 at 7:28 AM, Yash Jain <yashjain.lnm@gmail.com> wrote:
>> Hello,
>> I have two accounts on github("yj291197" and "yaki29").
>> Both the accounts have different gmail IDs("yj291197@gmail.com" and
>> "yashjain.lnm@gmail.com" respectively) but same passwords.
>> I used to use git for "yj291197" account and a few days earlier I made
>> this new account and used git commit to commit on "yaki29" but it
>> appeared as "yj291197" committed on "yaki29's" repo.
>> Then I pulled a request of that commit then it appeared "yaki29"
>> pulled a request with a commit of "yj291197".
>>
>> And during this whole session I was signed in as "yaki29" on github.com .
>>
>
> This is a Github issue, so ask Github support.
>
> Or read up on .mailmap files.

I am (obviously) not a GitHub support, but I think the confusion is
coming from not understanding who the committer and the author of a
commit are and where they are coming from.  They are both recorded
locally, taken from user.name and user.email configuration variables
when the commits are made.  "git push" to propagate them to GitHub
will NOT change these values of a commit, once a commit is created.

The story described looks quite consistent if the user has
yj291197@gmail.com configured as user.email and kept making commits
in the local repository, and pushed them to either yj291197 or yaki29
accounts at GitHub, without ever changing the local configuration to
use the other e-mail address.  All commits would record the user and
e-mail address yj291197, and the only one that may be attributed to
the new one yaki29 would be the automerge created at GitHub when a
pull request is responded on-site without first fetching and making
a merge locally.


```

## Junio C Hamano, 2016-10-24 21:14

Subject: Re: Reporting Bug in Git Version Control System
Message-ID: <xmqqh98130vy.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqh98130vy.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <xmqqzilt61jo.fsf@gitster.mtv.corp.google.com>

```
Junio C Hamano <gitster@pobox.com> writes:

> Stefan Beller <sbeller@google.com> writes:
>
>> On Mon, Oct 24, 2016 at 7:28 AM, Yash Jain <yashjain.lnm@gmail.com> wrote:
>>> Hello,
>>> I have two accounts on github("yj291197" and "yaki29").
>>> Both the accounts have different gmail IDs("yj291197@gmail.com" and
>>> "yashjain.lnm@gmail.com" respectively) but same passwords.
>>> I used to use git for "yj291197" account and a few days earlier I made
>>> this new account and used git commit to commit on "yaki29" but it
>>> appeared as "yj291197" committed on "yaki29's" repo.
>>> Then I pulled a request of that commit then it appeared "yaki29"
>>> pulled a request with a commit of "yj291197".
>>>
>>> And during this whole session I was signed in as "yaki29" on github.com .
>>>
>>
>> This is a Github issue, so ask Github support.
>>
>> Or read up on .mailmap files.
>
> I am (obviously) not a GitHub support, but I think the confusion is
> coming from not understanding who the committer and the author of a
> commit are and where they are coming from.  They are both recorded
> locally, taken from user.name and user.email configuration variables
> when the commits are made.  "git push" to propagate them to GitHub
> will NOT change these values of a commit, once a commit is created.
>
> The story described looks quite consistent if the user has
> yj291197@gmail.com configured as user.email and kept making commits
> in the local repository, and pushed them to either yj291197 or yaki29
> accounts at GitHub, without ever changing the local configuration to
> use the other e-mail address.  All commits would record the user and
> e-mail address yj291197, and the only one that may be attributed to
> the new one yaki29 would be the automerge created at GitHub when a
> pull request is responded on-site without first fetching and making
> a merge locally.

IOW, this sounds like Pebkac to me.  There is no a thing that needs
fixing in Git, and I do not immediately see there is anything GitHub
needs to fix, either.  The user may need fixing, though ;-).



```

## Pranit Bauva, 2016-10-25 08:51

Subject: Re: Reporting Bug in Git Version Control System
Message-ID: <CAFZEwPNB1PX_NOaYzKr+rUKvbC9s5A1G58v5aS=sGdzPVsv4ww@mail.gmail.com>
URL: https://gitlist.dev/e/CAFZEwPNB1PX_NOaYzKr%2BrUKvbC9s5A1G58v5aS%3DsGdzPVsv4ww%40mail.gmail.com
In-Reply-To: <CAN8fUZe4iWJCZYqBBDbNyPq1Dz7f4xvTNRVEZgg5AYN2NrKCbg@mail.gmail.com>

```
Hey Yash,

Junio has explained the problem very well. Since you seem to be a
beginner (guessing purely by your email) I will tell you how to fix
it.

Remember when you would have first installed git, you would have done
something like `git config --global user.name <what ever name>` and
`git config --global user.email <what ever email>`, it gets
permanently stored in the git configuration file (~/.gitconfig). Now
all the commits in git are made with this name and email. If you want
to change this, again run the above commands with your new name and
email. After that commits will be done with a different name and
email. Hope this helps! :)

Regards,
Pranit Bauva

```

## Jakub Narębski, 2016-10-31 16:09

Subject: Re: Reporting Bug in Git Version Control System
Message-ID: <fb358e96-02e3-e162-94a6-7cf20ee3f7cf@gmail.com>
URL: https://gitlist.dev/e/fb358e96-02e3-e162-94a6-7cf20ee3f7cf%40gmail.com
In-Reply-To: <CAFZEwPNB1PX_NOaYzKr+rUKvbC9s5A1G58v5aS=sGdzPVsv4ww@mail.gmail.com>

```
W dniu 25.10.2016 o 10:51, Pranit Bauva pisze:
> Hey Yash,
> 
> Junio has explained the problem very well. Since you seem to be a
> beginner (guessing purely by your email) I will tell you how to fix
> it.
> 
> Remember when you would have first installed git, you would have done
> something like `git config --global user.name <what ever name>` and
> `git config --global user.email <what ever email>`, it gets
> permanently stored in the git configuration file (~/.gitconfig). Now
> all the commits in git are made with this name and email. If you want
> to change this, again run the above commands with your new name and
> email. After that commits will be done with a different name and
> email. Hope this helps! :)

First, per user Git configuration doesn't necessarily go into ~/.gitconfig;
it could be in ~/.config/git/config

Second, you can configure user.email and user.name with `git config` or
`git config --local`.  The information would go into .git/config for
specific repository.  This might be a better solution if you want
different settings for different repositories.

-- 
Jakub Narębski


```
