3 email = hassan@afify.dev
4 signingkey = E7855210AD9062A0
8 excludesfile = ~/.config/git/.gitignore
35 template = ~/.config/git/.gitmessage
52 helper = cache --timeout=600
55 smtpserver = mail.privateemail.com
56 smtpuser = hassan@afify.dev
64 st = !git status | less -R
65 s = status --short --branch
73 chp = cherry-pick -e #hash..#otherhashrange # choose a commit from one branch and apply it onto another
74 show-unmerged-commits = cherry -v master #branch
75 merge-aboard = merge --abort
76 # show-unmerged-fullcommits = !git log $1 --not master --stat && echo
79 p = push github master
80 pushall = !git remote | xargs -L1 git push
81 show-unpushed-branches = log --branches --not --remotes --simplify-by-decoration --decorate --oneline
82 # show-unpushed-commits =
86 create-diff = !sh ~/.scripts/create_diff_git.sh
87 apply-diff = !result=$(ls *.diff | dmenu -p 'select diff file' -l 10) && git apply $result
88 # df = difftool master..otherbr -- filename
91 c = commit -S # commit and sign
92 cedit = !git commit --amend && git push --force github master # edit last commit message
93 # commit_old = commit --date "Wed Feb 16 14:00 2020 +0100" -S
94 # git show commit:filename # show_file_old_commit
97 t = tag -a -s #tagname # create annotated tag
98 tlight = tag -s #tagname #commit_name # create lightweight tag
99 tc = !git tag -a -s -m "v$(awk '/^VERSION/{print $NF}' config.mk)" \
100 v$(awk '/^VERSION/{print $NF}' config.mk) # new tag C
101 push-tag = push github #tagname
102 pushall-tags = push github --tags
103 fetch-tag = fetch --tags
104 delete-tag = tag --delete # tagname
105 delete-remote-tag = push --delete github # tagname
106 tv = tag -v # tagname
108 tag-tobranch = checkout -b tag_temp_branch #tagname
111 # git push origin :refs/tags/old
113 # git tag <tag name> <tag name>^{} -f -a -s
116 ll = log --all --graph --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ %C(#c0d6de)%s\\ %C(#17b062)%d"
117 lgpg = log --all --graph --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)%G?\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
118 ld = log --all --graph --date=format:'%a %d %b %Y' --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ %C(#888888)(%cd)\\ %C(#c0d6de)%s\\ %C(#17b062)%d"
119 ldd = log --all --graph --date=format:'%a %d %b %Y %I:%M %p' --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ %C(#888888)(%cd)\\ %C(#c0d6de)%s\\ %C(#17b062)%d"
120 l = log --graph --date=format:'%a %d %b %Y' --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ %C(#888888)(%cd)\\ %C(#c0d6de)%s\\ %C(#17b062)%d"
121 find = log --all --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d" --name-status --grep
122 stat = !git diff --stat $(git merge-base HEAD \"master\")
123 fh = log --follow -p --
127 f = fetch --prune -v github # verbose mode
128 fs = log github/master ^master # show fetch updates
132 be = branch --edit-description
133 show-unmerged-branches = branch --no-merged master
134 show-merged-branches = branch --merged master
135 delete-remote-branch = push -d github #branch name
136 show-ahead = rev-list --count master...
137 # git push -f origin $old_commit_id:master # change remote branch
138 # git reset --hard origin/<branch_name> # force sync with remote
139 # git branch -m old-name new-name # rename branches
140 # git remote rename origin destination # rename remote
141 # git remote set-url origin git@github.com:USERNAME/REPOSITORY.git # rename remote url
144 r = rm -r # remove file
145 adddeleted = !git ls-files --deleted | xargs git add
147 unstage-file = restore --staged
148 uncommit = reset --soft HEAD
149 # forcerestore = !git reset --hard HEAD $1 && git clean -f
150 # git reset --hard github/master
152 # Track Ignore files dirs
153 untrack= rm -r --cached --ignore-unmatch
154 retrack = update-index --no-assume-unchanged
155 show-untracked = ls-files . --exclude-standard --others
156 show-ignored = ls-files . --ignored --exclude-standard --others
157 # show-file = show 00c7250:sfm.c | vim - -n
159 # interactive staging
160 addi = add --interactive
163 # k = git remote prune github
164 # reflog expire --all --expire=now
165 k = gc --prune=now --aggressive