Skip to content

Commit

Permalink
change how to .gitignore global
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiyo510 committed Mar 31, 2024
1 parent 34058b2 commit ee46c3b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
name = Kiyo510
[core]
editor = vim
excludesfile = ~/.gitignore_global
quotepath = false
autocrlf = input
[merge]
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions git/sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
set -exu

GIT_CONFIG_DIR="$HOME/.config/git"
DATE=$(date +%s)

echo "start sync git config.."
if [ -L "${GIT_CONFIG_DIR}" -o -d "${GIT_CONFIG_DIR}" ]; then
mv "${GIT_CONFIG_DIR}" "${GIT_CONFIG_DIR}_$DATE"
fi

if [ ! -d "$GIT_CONFIG_DIR" ]; then
mkdir -p "$GIT_CONFIG_DIR"
fi

ln -snfv "$HOME/dotfiles/git/ignore" "${GIT_CONFIG_DIR}/ignore"
1 change: 1 addition & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ source "$THIS_DIR/vscode/sync.sh"
source "$THIS_DIR/alfred/sync.sh"
source "$THIS_DIR/alacritty/sync.sh"
source "$THIS_DIR/zsh/macos_defaults.sh"
source "$THIS_DIR/git/sync.sh"

# install z
if ! command -v z >/dev/null 2>&1; then
Expand Down

0 comments on commit ee46c3b

Please sign in to comment.