Move git configs into dotfiles role
This commit is contained in:
parent
f7a29e3c1d
commit
bc4b9f8089
4 changed files with 13 additions and 0 deletions
95
Ansible/roles/dotfiles/files/git/gitconfig
Normal file
95
Ansible/roles/dotfiles/files/git/gitconfig
Normal file
|
@ -0,0 +1,95 @@
|
|||
[user]
|
||||
name = Eryn Wells
|
||||
email = eryn@erynwells.me
|
||||
[core]
|
||||
editor = nvim
|
||||
quotepath = false
|
||||
excludesfile = ~/.gitignore
|
||||
[color]
|
||||
ui = auto
|
||||
[alias]
|
||||
amend = commit --amend --no-edit
|
||||
edit = commit --amend --only
|
||||
|
||||
# Commits
|
||||
c = commit
|
||||
cm = commit -m
|
||||
ca = commit -a
|
||||
cam = commit -am
|
||||
# Amended commits
|
||||
ce = commit --amend --only
|
||||
cn = commit --amend
|
||||
cna = commit --amend -a
|
||||
cnam = commit --amend -am
|
||||
|
||||
# Status, diffs
|
||||
s = status
|
||||
l = log
|
||||
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
|
||||
d = diff
|
||||
dc = diff --cached
|
||||
dt = difftool
|
||||
mine = log --author='Eryn Wells'
|
||||
|
||||
# Branches, etc
|
||||
b = branch
|
||||
co = checkout
|
||||
cob = checkout -b
|
||||
|
||||
# Merges and rebases
|
||||
m = merge
|
||||
ma = merge --abort
|
||||
mt = mergetool
|
||||
rb = rebase
|
||||
rbi = rebase --interactive
|
||||
rbc = rebase --continue
|
||||
rba = rebase --abort
|
||||
rbs = rebase --skip
|
||||
rbm = rebase origin/master master
|
||||
|
||||
# Resets, moving HEAD
|
||||
r = reset
|
||||
r1 = reset HEAD^
|
||||
r2 = reset HEAD^^
|
||||
rh = reset --hard
|
||||
rh1 = reset --hard HEAD^
|
||||
rh2 = reset --hard HEAD^^
|
||||
|
||||
# Remotes
|
||||
p = push -u
|
||||
pf = push -uf
|
||||
f = fetch
|
||||
sup = submodule update --recursive
|
||||
really-clean = clean -fd
|
||||
[ui]
|
||||
color = true
|
||||
[diff]
|
||||
tool = KS
|
||||
algorithm = histogram
|
||||
[difftool]
|
||||
prompt = false
|
||||
[difftool "KS"]
|
||||
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
|
||||
[merge]
|
||||
tool = KS
|
||||
[mergetool]
|
||||
keepBackup = true
|
||||
prompt = false
|
||||
[mergetool "KS"]
|
||||
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
|
||||
trustExitCode = true
|
||||
[push]
|
||||
default = simple
|
||||
[rebase]
|
||||
autoStash = true
|
||||
[sendemail]
|
||||
transferEncoding = base64
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
[pull]
|
||||
rebase = true
|
||||
[init]
|
||||
defaultBranch = main
|
33
Ansible/roles/dotfiles/files/git/gitignore
Normal file
33
Ansible/roles/dotfiles/files/git/gitignore
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Vim
|
||||
*~
|
||||
|
||||
# OS X
|
||||
.DS_Store
|
||||
|
||||
# Xcode
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.xcuserstate
|
||||
|
||||
# Build files
|
||||
*.[oa]
|
||||
*.so
|
||||
*.pyc
|
||||
|
||||
# Python
|
||||
__pycache__/
|
||||
env/
|
||||
|
||||
# SSH -- never commit keys!
|
||||
ssh/id*
|
10
Ansible/roles/dotfiles/tasks/git.yml
Normal file
10
Ansible/roles/dotfiles/tasks/git.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
- name: (git) Link global git configs
|
||||
ansible.builtin.file:
|
||||
path: ~/.{{ item }}
|
||||
src: "{{ role_path }}/files/git/{{ item }}"
|
||||
state: link
|
||||
force: true
|
||||
loop:
|
||||
- gitconfig
|
||||
- gitignore
|
|
@ -4,3 +4,6 @@
|
|||
|
||||
- name: Vim
|
||||
ansible.builtin.include_tasks: vim.yml
|
||||
|
||||
- name: Git
|
||||
ansible.builtin.include_tasks: git.yml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue