-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.yml
62 lines (58 loc) · 2.82 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
# Automatic evaluated variables.
# Can be altered if role is not executed by the user that will use the features.
git_user_id: "{{ ansible_env.USER | d('root') }}"
git_user_home: "{{ ansible_env.HOME | d('/root') }}"
git_user_name: "" # name shown in git history
git_user_email: "{{ git_user_name }}@gmail.com" # e-mail address shown in git history
# Specific Git behaviour / configuration
git_push_strategy: "simple"
git_pull_rebase: true
git_rebase_autosquash: false
git_branch_autosetuprebase: "never"
git_alias_list:
- {alias: 'bb', cmd: 'bisect bad'}
- {alias: 'bg', cmd: 'bisect good'}
- {alias: 'br', cmd: 'branch'}
- {alias: 'bra', cmd: 'branch --all'}
- {alias: 'bs', cmd: 'bisect skip'}
- {alias: 'chp', cmd: 'cherry-pick'}
- {alias: 'ci', cmd: 'commit'}
- {alias: 'co', cmd: 'checkout'}
- {alias: 'cob', cmd: 'checkout -b'}
- {alias: 'fix', cmd: "!fix() { git commit --fixup $1 && GIT_SEQUENCE_EDITOR=: git rebase --interactive --autosquash --autostash $1~1; }; fix"}
- {alias: 'fix-author', cmd: "!fix() { git rebase --rebase-merges $1 --exec 'git commit --amend --no-edit --reset-author'; }; fix"}
- {alias: 'g', cmd: "!git gui"}
- {alias: 'k', cmd: "!gitk --all"}
- {alias: 'l', cmd: 'log --oneline'}
- {alias: 'loc', cmd: "!loc() { git ls-files | grep -P \".*\\.($1)$\" | xargs wc -l; }; loc"}
- {alias: 'ma', cmd: 'merge --abort'}
- {alias: 'mc', cmd: 'merge --continue'}
- {alias: 'mq', cmd: 'merge --quit'}
- {alias: 'pushdel', cmd: 'push origin --delete'}
- {alias: 'pushfwl', cmd: 'push --force-with-lease'}
- {alias: 'pusho', cmd: "!git push -u origin $(git rev-parse --abbrev-ref HEAD)"}
- {alias: 'ra', cmd: 'rebase --abort'}
- {alias: 'rank', cmd: 'shortlog -sn --no-merges'}
- {alias: 'rc', cmd: 'rebase --continue'}
- {alias: 'reh', cmd: 'reset --hard'}
- {alias: 'res', cmd: 'reset --soft'}
- {alias: 'reso', cmd: 'reset --soft HEAD~'}
- {alias: 'ri', cmd: 'rebase -i'}
- {alias: 'ro', cmd: 'rebase --onto'}
- {alias: 'rpo', cmd: 'remote prune origin'}
- {alias: 'rs', cmd: 'rebase --skip'}
- {alias: 'sdr', cmd: 'stash drop'}
- {alias: 'spo', cmd: 'stash pop'}
- {alias: 'spu', cmd: 'stash push'}
- {alias: 'st', cmd: 'status --short'}
# Additional features that can be enabled.
git_graphical_tools: true # install graphical git tools
git_aliases: false # enable predefined git aliases
git_rerere: false # enable rerere in git config
git_editor_nano: false # install and define nano as git editor
git_prompt: false # install some scripts and define prompt to show git branch. Needs bash!
git_archivestotext: false # enable diff of archive files
git_docxtotext: false # enable diff of doc/docx files
git_pdftotext: false # enable diff of pdf files
git_xlsxtotext: false # enable diff of xls/xlsx files