Reputation: 8602
I often saw colleagues's private account and company account both showing in the commit log. How does this happen?
for example, one has a jack
private Github account and a company account called workjack
, I can see the two account are push to our company private repository(in commit log).
Upvotes: 1
Views: 452
Reputation: 1324505
This is often the case when one does not set user.name
and user.email
in each repo, but rather one user.name/email globally (git config --global user.name xxx
).
Then that setting applies to all repos on the user's machine.
If this is done both at home (private account) and at work (work account), then commits done (and pushed) from both this places would get different user accounts associated to them, even though the repo might call for only one of those accounts to be used.
Upvotes: 1