From 6c0b12c362563e341426f8f3a37b6f56e9bb114e Mon Sep 17 00:00:00 2001 From: Vasili Svirydau Date: Tue, 16 Nov 2021 22:47:13 +0000 Subject: [PATCH] =?UTF-8?q?=D1=85=D1=83=D0=B9=20=D1=82=D0=B0=D0=BC=20?= =?UTF-8?q?=D0=BF=D0=BB=D0=B0=D0=B2=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + dotfiles/.gitconfig | 6 +++--- setup.d/20-gitconfig.sh | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 setup.d/20-gitconfig.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..05bf648 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.local.sh diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig index c002699..55a7921 100644 --- a/dotfiles/.gitconfig +++ b/dotfiles/.gitconfig @@ -1,6 +1,6 @@ [user] name = Vasili Svirydau - email = vsvirydau@copperleaf.com + email = vasili.svirydau@sterlingcapitalbrokers.com [push] default = simple @@ -31,5 +31,5 @@ [rebase] instructionFormat = (%an <%ae>) %s [pull] - rebase = true - ff = only + rebase = true + ff = only diff --git a/setup.d/20-gitconfig.sh b/setup.d/20-gitconfig.sh new file mode 100644 index 0000000..fb14d18 --- /dev/null +++ b/setup.d/20-gitconfig.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +DOTFILES=$( cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd || return) +GITCONFIG="${DOTFILES}/bash.d/10-gitconfig.local.sh" + +if [[ -z "${GIT_AUTHOR_NAME}" ]]; then + read -p 'Git Author Name: ' GIT_AUTHOR_NAME +fi + +if [[ -z "${GIT_AUTHOR_EMAIL}" ]]; then + read -p 'Git Author Email: ' GIT_AUTHOR_EMAIL +fi + +cat > "$GITCONFIG" <