[feat] bluetooth_connect check status
[dotfiles_afify.git] / .gitconfig
blobdb998f0e329d25f9d9054333802ee90b4bba5584
1 [user]
2         name = Hassan Afify
3         email = hassan@afify.dev
4         signingkey = E7855210AD9062A0
6 [core]
7         editor = vim
9 [color]
10         ui = true
11         diff = auto
12         status = auto
13         branch = auto
14         interactive = auto
16 [merge]
17         tool = vimdiff
19 [mergetool]
20         prompt = false
21         keepBackup = false
23 [diff]
24         tool = vimdiff
25         noprefix = true
26         algorithm = patience
27         renames = copies
29 [difftool]
30         prompt = false
32 [commit]
33         gpgsign = true
34         template = ~/.gitmessage
36 [push]
37         default = current
38         followTags = true
40 [github]
41         user = Afify
43 [log]
44         date = local
45         extendedRegexp = true
47 [gpg]
48         program = gpg2
50 [hub]
51         protocol = https
53 # [url "https://"]
54 #       insteadOf = git://
56 [alias]
57         s = status
58         st = status --short --branch
59         ch = checkout
60         remotes = remote -v # show remotes urls
62 # Merge
63         m = merge
64         chp = cherry-pick -e #hash..#otherhashrange # choose a commit from one branch and apply it onto another
65         show-unmerged-commits = cherry -v master #branch
66         merge-aboard = merge --abort
67 #       show-unmerged-fullcommits = !git log $1 --not master --stat && echo
69 # Push
70         p = push github master
71         pushall = !git remote | xargs -L1 git push --all
72         show-unpushed-branches = log --branches --not --remotes --simplify-by-decoration --decorate --oneline
73 #       show-unpushed-commits =
75 # Diff
76         d = difftool HEAD
77         # df = difftool master..otherbr -- filename
79 # Commit
80         c = commit -S # commit and sign
81         cedit = !git commit --amend && git push --force github master # edit last commit message
82         # git show commit:filename                           # show_file_old_commit
84 # Tags
85         t = tag -a -s  #tagname                        # create annotated tag
86         tlight = tag -s #tagname  #commit_name         # create lightweight tag
87         tc = !git tag -a -s v$(awk '/^VERSION/{print $NF}' config.mk) # new tag C
88         push-tag = push github #tagname
89         pushall-tags = push github --tags
90         fetch-tag = fetch --tags
91         delete-tag = tag --delete # tagname
92         delete-remote-tag = push --delete github # tagname
93         tv = tag -v # tagname
94         tlist = tag --list #"v2*"
95         tlist-all = tag -l -n
96         tag-tobranch = checkout -b tag_temp_branch #tagname
98 # Log
99         l  = log --all --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
100         ll  = log --all --graph --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
101         lo  = log --all --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cr)%d\\ \\%C(#c0d6de)%s"
102         ld  = log --all --date=format:'%a %d %b' --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cd)%d\\ \\%C(#c0d6de)%s"
103         lg = log --all --graph --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cr)%d\\ \\%C(#c0d6de)%s"
104         lf = log -p
105         stat = !git diff --stat $(git merge-base HEAD \"master\")
106         fh = log --follow -p --
108 # Fetch
109         f = fetch -v github                       # verbose mode
110         fs = log github/master ^master            # show fetch updates
111         pullrequest = !hub pr show                # show pull request
112         issue = !hub issue                        # show issues
114 # Branch
115         br = branch
116         be = branch --edit-description
117         bra = branch -av
118         show-unmerged-branches = branch --no-merged master
119         show-merged-branches = branch --merged master
120         delete-remote-branch = push -d github  #branch name
121         delete-remote-branch = push --delete github #branch name
122         show-ahead = rev-list --count master...
123         # git push -f origin $old_commit_id:master         # change remote branch
124         # git reset --hard origin/<branch_name>            # force sync with remote
125         # git branch -m old-name new-name                  # rename branches
126         # git remote rename origin destination             # rename remote
127         # git remote set-url origin git@github.com:USERNAME/REPOSITORY.git # rename remote url
129 # Remove Undo
130         r = rm -r                                                  # remove file
131         adddeleted = !git ls-files --deleted | xargs git add
132         unstage-all = reset
133         unstage-file = restore --staged
134         uncommit = reset --soft HEAD
135 #       forcerestore = !git reset --hard HEAD $1  && git clean -f
136 #       git reset --hard github/master
138 # Track Ignore files dirs
139         untrack= rm -r --cached --ignore-unmatch
140         retrack = update-index --no-assume-unchanged
141         show-untracked = ls-files . --exclude-standard --others
142         show-ignored = ls-files . --ignored --exclude-standard --others
144 # interactive staging
145         addi = add --interactive
147 # diff
148         create-diff = !sh ~/.scripts/create_diff_git.sh
149         apply-diff = !result=$(ls *.diff | dmenu -p 'select diff file' -l 10) && git apply $result