feat: git files

This commit is contained in:
Marley 2024-01-21 21:00:53 -08:00
parent 44ef14cf1e
commit 8d0659867e
4 changed files with 20 additions and 2 deletions

View file

@ -0,0 +1,5 @@
# vim:set ft=toml sw=4 :
[user]
name = Marley Rae
email = marley@punkfairie.net

13
git/.gitconfig.symlink Normal file
View file

@ -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

View file

@ -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