From 8d0659867ee28b18ff765ec6493c6583dc3ccf7b Mon Sep 17 00:00:00 2001 From: Marley Date: Sun, 21 Jan 2024 21:00:53 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20git=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git/.gitconfig.local.symlink | 5 +++++ ...ink.example => .gitconfig.local.symlink.example} | 0 git/.gitconfig.symlink | 13 +++++++++++++ script/dot.sh | 4 ++-- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 git/.gitconfig.local.symlink rename git/{gitconfig.local.symlink.example => .gitconfig.local.symlink.example} (100%) create mode 100644 git/.gitconfig.symlink diff --git a/git/.gitconfig.local.symlink b/git/.gitconfig.local.symlink new file mode 100644 index 0000000..d1f88cf --- /dev/null +++ b/git/.gitconfig.local.symlink @@ -0,0 +1,5 @@ +# vim:set ft=toml sw=4 : + +[user] + name = Marley Rae + email = marley@punkfairie.net diff --git a/git/gitconfig.local.symlink.example b/git/.gitconfig.local.symlink.example similarity index 100% rename from git/gitconfig.local.symlink.example rename to git/.gitconfig.local.symlink.example diff --git a/git/.gitconfig.symlink b/git/.gitconfig.symlink new file mode 100644 index 0000000..eb50a48 --- /dev/null +++ b/git/.gitconfig.symlink @@ -0,0 +1,13 @@ +# vim:set ft=toml sw=4 : + +[alias] + prevision = "!f() { git checkout `git log --oneline $2 | awk -v commit=\"$1\" 'FNR == -commit+1 {print $1}'` $2; }; f" + nevermind = "reset --hard HEAD && git clean -df" + +[rebase] + autosquash = true +[merge] + tool = vimdiff +[mergetool] + keepBackup = false + hideResolved = true diff --git a/script/dot.sh b/script/dot.sh index 11b5282..d2b5832 100644 --- a/script/dot.sh +++ b/script/dot.sh @@ -130,7 +130,7 @@ setup_gitconfig() { cd "$dotfiles_dir" - if ! [[ -f $dotfiles_dir/git/gitconfig.local.symlink ]]; then + if ! [[ -f $dotfiles_dir/git/.gitconfig.local.symlink ]]; then print_title "Set up gitconfig" git_credential="cache" @@ -148,7 +148,7 @@ setup_gitconfig() sed -e "s/AUTHORNAME/$git_authorname/g" \ -e "s/AUTHOREMAIL/$git_authoremail/g" \ -e "s/GIT_CREDENTIAL_HELPER/$git_credential/g" \ - $dotfiles_dir/git/gitconfig.local.symlink.example > $dotfiles_dir/gitconfig.local.symlink + $dotfiles_dir/git/.gitconfig.local.symlink.example > $dotfiles_dir/.gitconfig.local.symlink print_result $? "gitconfig" fi