diff options
author | William Carroll <wpcarro@gmail.com> | 2020-03-05T14·06+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-03-05T14·09+0000 |
commit | 3b689f03de755f6a241f9c042270c0d7e579a657 (patch) | |
tree | 374060c01ecfdc7a3de7bda1726aa85e5209eb5f | |
parent | 0cb1086adcadafcb4d5c41f2abcc3436b284fb15 (diff) |
Support gitconfig with home-manager
- Migrate configuration from .gitconfig to home-manager. - Delete .gitconfig. - Delete .gitignore because I'm not using OSX anymore.
-rw-r--r-- | configs/shared/.config/nixpkgs/home.nix | 21 | ||||
-rw-r--r-- | configs/shared/.gitconfig | 26 | ||||
-rw-r--r-- | configs/shared/.gitignore | 2 |
3 files changed, 21 insertions, 28 deletions
diff --git a/configs/shared/.config/nixpkgs/home.nix b/configs/shared/.config/nixpkgs/home.nix index 8307d6b86a29..29e80824efea 100644 --- a/configs/shared/.config/nixpkgs/home.nix +++ b/configs/shared/.config/nixpkgs/home.nix @@ -15,6 +15,27 @@ path = builtins.toPath ~/home-manager; }; + programs.git = { + enable = true; + userName = "William Carroll"; + userEmail = "wpcarro@gmail.com"; + aliases = { + today = "! git log --date=relative --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\""; + yday = "! git log --since=yesterday.midnight --until=today.midnight --oneline --author=\"$(git config --get user.email)\""; + changed-files = "! git --no-pager diff --name-only $(current_branch) $(git merge-base $(current_branch) master)"; + conflicts = "! git --no-pager diff --name-only --diff-filter=U"; + unstage = "reset HEAD --"; + }; + extraConfig = { + push.default = "current"; + rebase = { + autosquash = true; + autostash = true; + }; + rerere.enabled = true; + }; + }; + ############################################################################## # Services ############################################################################## diff --git a/configs/shared/.gitconfig b/configs/shared/.gitconfig deleted file mode 100644 index 4aa8e82d7dc9..000000000000 --- a/configs/shared/.gitconfig +++ /dev/null @@ -1,26 +0,0 @@ -[user] - name = William Carroll - email = wpcarro@gmail.com -[alias] - recent = ! git for-each-ref --count=10 --sort=-committerdate refs/heads/ --format=\"%(refname:short)\" | fzf | xargs git checkout - today = ! git log --date=relative --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\" - changed-files = ! git --no-pager diff --name-only $(current_branch) $(git merge-base $(current_branch) master) - conflicts = ! git --no-pager diff --name-only --diff-filter=U - yday = ! git log --since=yesterday.midnight --until=today.midnight --oneline --author=\"$(git config --get user.email)\" - patch-grep = log -p -S - unstage = reset HEAD -- - appraise = ! $HOME/go/bin/git-appraise -[push] - default = current -[rebase] - autosquash = true - autostash = true -[remote "origin"] - fetch = +refs/pull/*/head:refs/remotes/origin/pr/* -[github] - user = wpcarro -[core] - excludesfile = ~/.gitignore - pager = less -[rerere] - enabled = true diff --git a/configs/shared/.gitignore b/configs/shared/.gitignore deleted file mode 100644 index 0d9002511ec2..000000000000 --- a/configs/shared/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Mac -.DS_Store |