Skip to content

Commit fff74de

Browse files
committed
Add os-specific git config
1 parent 63429ff commit fff74de

5 files changed

Lines changed: 24 additions & 4 deletions

File tree

debian/tools/git/build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ DOT_HOME="$(dirname "$(dirname "$(dirname "$SCRIPT_DIR")")")"
77

88
# Call shared build script
99
"$DOT_HOME/shared/tools/git/build"
10+
11+
# Copy Debian-specific git configuration
12+
if [[ -f "$SCRIPT_DIR/config/gitconfig.os" ]]; then
13+
cp "$SCRIPT_DIR/config/gitconfig.os" "$HOME/.gitconfig.os"
14+
echo "[Debian] OS-specific git configuration installed"
15+
fi
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Debian-specific git configuration
2+
[credential "https://github.com"]
3+
helper = !/usr/bin/gh auth git-credential
4+
[credential "https://gist.github.com"]
5+
helper = !/usr/bin/gh auth git-credential

macos/tools/git/build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ DOT_HOME="$(dirname "$(dirname "$(dirname "$SCRIPT_DIR")")")"
77

88
# Call shared build script
99
"$DOT_HOME/shared/tools/git/build"
10+
11+
# Copy macOS-specific git configuration
12+
if [[ -f "$SCRIPT_DIR/config/gitconfig.os" ]]; then
13+
cp "$SCRIPT_DIR/config/gitconfig.os" "$HOME/.gitconfig.os"
14+
echo "[macOS] OS-specific git configuration installed"
15+
fi
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# macOS-specific git configuration
2+
[credential "https://github.com"]
3+
helper = !/opt/homebrew/bin/gh auth git-credential
4+
[credential "https://gist.github.com"]
5+
helper = !/opt/homebrew/bin/gh auth git-credential

shared/tools/git/config/.gitconfig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
email = vikdotdev@gmail.com
33
name = Viktor Habchak
44
signingkey = 7392D21113383CBB
5-
[credential "https://github.com"]
6-
helper = !/usr/bin/gh auth git-credential
7-
[credential "https://gist.github.com"]
8-
helper = !/usr/bin/gh auth git-credential
5+
[include]
6+
path = ~/.gitconfig.os
97
[alias]
108
ci = commit
119
st = status

0 commit comments

Comments
 (0)