From 0d53ba8b01b67e852951f19e0ea98c1320593807 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 23 Aug 2024 02:01:16 +0200 Subject: [PATCH] Set user info during `git` setup --- scripts/Common/Software/git/Manage.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/Common/Software/git/Manage.ps1 b/scripts/Common/Software/git/Manage.ps1 index b5343bd1..45313ced 100644 --- a/scripts/Common/Software/git/Manage.ps1 +++ b/scripts/Common/Software/git/Manage.ps1 @@ -59,6 +59,19 @@ $null = New-Module { } } + if ($User) { + $displayName = Get-UserConfig "displayName"; + $mailAddress = Get-UserConfig "mailAddress"; + + if ($displayName) { + Set-GitConfig "user.name" $displayName; + } + + if ($mailAddress) { + Set-GitConfig "user.email" $mailAddress; + } + } + # Git Flow . { $dir = New-TemporaryDirectory;