visual studio code - How to set the default author email for every git commit in vscode? -


in vscode 1.15.0 git commits use wrong author email @localhost while correct committer email address used (git version 2.11.0 (apple git-81) on macos 10.12.6). configuration follows:

  1. i clone & push via ssh keys (from , github)
  2. global user.name = michael jordan
  3. global user.email = michael.jordan@jordan.com
  4. i set user.email locally in cloned repository
  5. my mac user mj (so home dir /users/mj)

after committing changes via vscode execute git log --format=full following result:

commit <my git commit hash here> author: michael jordan <mj@localhost> commit: michael jordan <michael.jordan@jordan.com>      dummy commit message 

this weird, because in scenario i'm both author , committer. however, while committer name/email fine seems author name correct , email wrong. reason author email seems mac user "mj" on localhost. on other side author name "michael jordan" seems fetched user.name settings of git.

i know can fix

git commit --amend --author "michael jordan <michael.jordan@jordan.com>" 

however, it's not comfortable doing after every commit via vscode.

how can fix once commits done via vscode - , repositories? it's worth mention don't have such issues if use eclipse/egit (i guess uses settings user.name , user.email).

i know

git commit -m "my commit message" . 

also uses "michael jordan " author (same vscode). i'm desperately looking config option in vscode. , want avoid hooks...

any idea?

update 1:

i've tried same thing on win 8.1 latest git version 2.14.1 , latest x64 vscode 1.15.0 - , works fine there! here author expected (so both commiter , author same):

michael jordan <michael.jordan@jordan.com>

after installed git version 2.14.1 on mac , tried there. here did not work - author email wrong. in both cases cloned git repo github - had clean repo both on win , mac. difference must on mac have configured ssh keys github, don't have on win 8.1 machine.

look found in .bash_profile:

... export git_author_name="michael jordan" export git_author_email="mj@localhost" ... 

this overwriting user.name , user.email

my fault :-(


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -