From 559daef6c257e74bda4ef6fafc1268c343850cc0 Mon Sep 17 00:00:00 2001 From: Marley Rae Date: Tue, 30 Jan 2024 19:28:48 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Pull=20in=20alrra/dotfiles/git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++- git/.gitattributes | 1 + git/.gitconfig.symlink | 40 +++++++----- git/.gitignore | 1 + git/aliases.config.fish | 44 +++++++++---- projects/.gitattributes | 10 +++ projects/.gitignore | 140 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 218 insertions(+), 28 deletions(-) create mode 120000 git/.gitattributes create mode 120000 git/.gitignore create mode 100644 projects/.gitattributes create mode 100644 projects/.gitignore diff --git a/README.md b/README.md index e1766f0..12b6944 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,15 @@ mar does dotfiles # post install -Set iTerm2 to use the preferences file, if applicable. +## iTerm2 + +Set iTerm2 to use the preferences folder ~/dotfiles/os/. + +## fish + +```fish +fish_config theme save "Catppuccin Mocha" +``` ## tmux diff --git a/git/.gitattributes b/git/.gitattributes new file mode 120000 index 0000000..31708dd --- /dev/null +++ b/git/.gitattributes @@ -0,0 +1 @@ +/Users/marley/dotfiles/projects/.gitattributes \ No newline at end of file diff --git a/git/.gitconfig.symlink b/git/.gitconfig.symlink index 572fa14..41d8bbe 100644 --- a/git/.gitconfig.symlink +++ b/git/.gitconfig.symlink @@ -1,27 +1,35 @@ -# vim:set ft=gitconfig : +[core] + attributesFile = ~/dotfiles/git/.gitattributes + excludesFile = ~/dotfiles/git/.gitignore + +[user] + # Do not guess the user's identity. + useConfigOnly = true [color] - diff = always + diff = always [pretty] - lo = tformat:%C(auto)%h%C(reset)%C(auto)%d%C(reset) %s %C(italic blue)%ad%C(reset) %C(241)%aN%C(reset) - lc = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n - lt = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n%w(0,7,7)%+(trailers:only,unfold) - lf = format:%C(auto)%h%C(reset)%C(auto)%d%C(reset) %C(italic 239)[P: %p] [T: %t]%C(reset)%n%C(white)Author:%C(reset) %aN %C(241)<%aE>%C(reset)%n %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%n%C(white)Commit:%C(reset) %cN %C(241)<%cE>%C(reset) %C(italic 239)[GPG: %G?% GK]%C(reset)%n %C(italic blue)%cd%C(reset) %C(italic cyan)(%cr)%C(reset)%w(0,4,4)%n%n%C(bold)%s%C(reset)%n%n%-b%n%n%-N%n - rlo = tformat:%C(auto)%h%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset)%C(auto)%d%C(reset) %gs %C(italic blue)%ad%C(reset) %C(241)%aN%C(reset) - rlc = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n %C(white)⤷%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset) %gs %C(241)- %gN <%gE>%C(reset)%n - rlt = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n %C(white)⤷%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset) %gs %C(241)- %gN <%gE>%C(reset)%n%w(0,7,7)%+(trailers:only,unfold) - rlf = format:%C(auto)%h%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset)%C(auto)%d%C(reset) %C(italic 239)[P: %p] [T: %t]%C(reset)%n%C(white)Author:%C(reset) %aN %C(241)<%aE>%C(reset)%n %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%n%C(white)Commit:%C(reset) %cN %C(241)<%cE>%C(reset) %C(italic 239)[GPG: %G?% GK]%C(reset)%n %C(italic blue)%cd%C(reset) %C(italic cyan)(%cr)%C(reset)%n%C(white)Reflog:%C(reset) %gN %C(241)<%gE>%C(reset)%n %C(italic)%gs%C(reset)%w(0,4,4)%n%n%C(bold)%s%C(reset)%n%n%-b%n%n%-N%n + lo = tformat:%C(auto)%h%C(reset)%C(auto)%d%C(reset) %s %C(italic blue)%ad%C(reset) %C(241)%aN%C(reset) + lc = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n + lt = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n%w(0,7,7)%+(trailers:only,unfold) + lf = format:%C(auto)%h%C(reset)%C(auto)%d%C(reset) %C(italic 239)[P: %p] [T: %t]%C(reset)%n%C(white)Author:%C(reset) %aN %C(241)<%aE>%C(reset)%n %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%n%C(white)Commit:%C(reset) %cN %C(241)<%cE>%C(reset) %C(italic 239)[GPG: %G?% GK]%C(reset)%n %C(italic blue)%cd%C(reset) %C(italic cyan)(%cr)%C(reset)%w(0,4,4)%n%n%C(bold)%s%C(reset)%n%n%-b%n%n%-N%n + rlo = tformat:%C(auto)%h%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset)%C(auto)%d%C(reset) %gs %C(italic blue)%ad%C(reset) %C(241)%aN%C(reset) + rlc = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n %C(white)⤷%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset) %gs %C(241)- %gN <%gE>%C(reset)%n + rlt = format:%C(auto)%h%C(reset) %C(white)-%C(reset) %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)⤷%C(reset) %s %C(241)- %aN <%aE>%C(reset)%n %C(white)⤷%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset) %gs %C(241)- %gN <%gE>%C(reset)%n%w(0,7,7)%+(trailers:only,unfold) + rlf = format:%C(auto)%h%C(reset) %C(bold yellow)(%C(magenta)%gd%C(bold yellow))%C(reset)%C(auto)%d%C(reset) %C(italic 239)[P: %p] [T: %t]%C(reset)%n%C(white)Author:%C(reset) %aN %C(241)<%aE>%C(reset)%n %C(italic blue)%ad%C(reset) %C(italic cyan)(%ar)%C(reset)%n%C(white)Commit:%C(reset) %cN %C(241)<%cE>%C(reset) %C(italic 239)[GPG: %G?% GK]%C(reset)%n %C(italic blue)%cd%C(reset) %C(italic cyan)(%cr)%C(reset)%n%C(white)Reflog:%C(reset) %gN %C(241)<%gE>%C(reset)%n %C(italic)%gs%C(reset)%w(0,4,4)%n%n%C(bold)%s%C(reset)%n%n%-b%n%n%-N%n +[init] + defaultBranch = main [push] - autoSetupRemote = true + autoSetupRemote = true [rebase] - autosquash = true + autosquash = true [merge] - tool = vimdiff + tool = vimdiff [mergetool] - keepBackup = false - hideResolved = true + keepBackup = false + hideResolved = true [include] - path = ~/.gitconfig.local + path = ~/.gitconfig.local diff --git a/git/.gitignore b/git/.gitignore new file mode 120000 index 0000000..566bc48 --- /dev/null +++ b/git/.gitignore @@ -0,0 +1 @@ +/Users/marley/dotfiles/projects/.gitignore \ No newline at end of file diff --git a/git/aliases.config.fish b/git/aliases.config.fish index 1d7beb1..1b7a913 100644 --- a/git/aliases.config.fish +++ b/git/aliases.config.fish @@ -59,13 +59,27 @@ abbr -a gaa --position command "git add --all" # Interactively stage parts of a file. abbr -a gapa --position command "git add --patch" -abbr -a gd --position command "git diff" -abbr -a gds --position command "git diff --staged" -abbr -a gdw --position command "git diff --word-diff" # show diff by word -abbr -a gdsw --position command "git diff --staged --word-diff" +abbr -a gdl --position command "git diff" +abbr -a gdls --position command "git diff --staged" +abbr -a gdlw --position command "git diff --word-diff" # show diff by word +abbr -a gdlsw --position command "git diff --staged --word-diff" -function gdnolock --wraps "git diff" - git diff $argv ":(exclude)package-lock.json" ":(exclude)*.lock" +set exclude ":(exclude)package-lock.json" ":(exclude)*.lock" + +function gd --wraps "git diff" + git diff $argv $exclude +end + +function gds --wraps "git diff" + git diff --staged $argv $exclude +end + +function gdw --wraps "git diff" + git diff --word-diff $argv $exclude +end + +function gdsw --wraps "git diff" + git diff --staged --word-diff $argv $exclude end abbr -a gst --position command "git status" @@ -75,16 +89,24 @@ abbr -a gsts --position command "git status --short" # Committing # ################################################################################ -abbr -a gc --position command "git commit" +abbr -a gc --position command "git commit" abbr -a "gc!" --position command "git commit --amend" abbr -a "gcn!" --position command "git commit --no-edit --amend" -abbr -a gca --position command "git commit -a" +abbr -a gca --position command "git add --all && git commit" abbr -a "gca!" --position command "git commit -a --amend" abbr -a "gcan!" --position command "git commit -a --no-edit --amend" -abbr -a gcam --position command "git commit -a -m" -abbr -a gcmsg --position command "git commit -m" +abbr -a gcam --position command "git commit -a -m" +abbr -a gcmsg --position command "git commit -m" -abbr -a grev --position command "git revert" +abbr -a grev --position command "git revert" + +# Update the last commit with all staged changes. +abbr -a gu --position command "git commit --amend" +abbr -a "gu!" --position command "git commit --amend --no-edit" + +# Update the last commit with all local changes. +abbr -a gua --position command "git add --all && git commit --amend" +abbr -a "gua!" --position command "git add --all && git commit --amend --no-edit" ################################################################################ # Working Dir & Index Manipulation # diff --git a/projects/.gitattributes b/projects/.gitattributes new file mode 100644 index 0000000..25ba6ef --- /dev/null +++ b/projects/.gitattributes @@ -0,0 +1,10 @@ +# Automatically normalize line endings. +# https://git-scm.com/docs/gitattributes +# https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings + +* text=auto + +*.png binary +*.jpg binary +*.jpeg binary +*.bmp binary diff --git a/projects/.gitignore b/projects/.gitignore new file mode 100644 index 0000000..a6ab274 --- /dev/null +++ b/projects/.gitignore @@ -0,0 +1,140 @@ +# https://github.com/github/gitignore + +################################################################################ +# Git # +################################################################################ + +*.patch +*.diff + +################################################################################ +# JetBrains # +################################################################################ + +# User-specific. +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files. +.idea/**/contentModel.xml + +# Sensitive or high-churn files. +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# File-based project format. +*.iws + +################################################################################ +# Vim # +################################################################################ + +# Swap. +[._]*.s[a-v][a-z] +!*.svg +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session. +Session.vim +Sessionx.vim + +# Temporary. +.netrwhist +*~ + +# Auto-generated tag files. +tags + +# Persistent undo. +[._]*.un~ + +################################################################################ +# Linux # +################################################################################ + +*~ + +# temporary files which can be created if a process still has a handle open of a +# deleted file. +.fuse_hidden* + +# KDE directory preferences. +.directory + +# Linux trash folder which might appear on any partition or disk. +.Trash-* + +# .nfs files are created when an open file is removed but is still being +# accessed. +.nfs* + +################################################################################ +# Windows # +################################################################################ + +# Windows thumbnail cache files. +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file. +*.stackdump + +# Folder config file. +[Dd]esktop.ini + +# Recycle Bin used on file shares. +$RECYCLE.BIN/ + +# Windows Installer files. +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts. +*.lnk + +################################################################################ +# macOS # +################################################################################ + +# General. +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r. +Icon + +# Thumbnails. +._* + +# Files that might appear in the root of a volume. +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share. +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk