3 email = hassan@afify.dev
4 signingkey = E7855210AD9062A0
33 template = ~/.gitmessage
54 s = status --short --branch
56 remotes = remote -v # show remotes urls
60 chp = cherry-pick -e #hash..#otherhashrange # choose a commit from one branch and apply it onto another
61 show-unmerged-commits = cherry -v master #branch
62 merge-aboard = merge --abort
63 # show-unmerged-fullcommits = !git log $1 --not master --stat && echo
66 p = push github master
67 pushall = !git remote | xargs -L1 git push
68 show-unpushed-branches = log --branches --not --remotes --simplify-by-decoration --decorate --oneline
69 # show-unpushed-commits =
73 create-diff = !sh ~/.scripts/create_diff_git.sh
74 apply-diff = !result=$(ls *.diff | dmenu -p 'select diff file' -l 10) && git apply $result
75 # df = difftool master..otherbr -- filename
78 c = commit -S # commit and sign
79 cedit = !git commit --amend && git push --force github master # edit last commit message
80 # commit_old = commit --date "Wed Feb 16 14:00 2020 +0100" -S
81 # git show commit:filename # show_file_old_commit
84 t = tag -a -s #tagname # create annotated tag
85 tlight = tag -s #tagname #commit_name # create lightweight tag
86 tc = !git tag -a -s v$(awk '/^VERSION/{print $NF}' config.mk) # new tag C
87 push-tag = push github #tagname
88 pushall-tags = push github --tags
89 fetch-tag = fetch --tags
90 delete-tag = tag --delete # tagname
91 delete-remote-tag = push --delete github # tagname
93 tlist = tag --list #"v2*"
95 tag-tobranch = checkout -b tag_temp_branch #tagname
98 l = log --all --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
99 lc = log --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
100 lgpg = log --all --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)%G?\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
101 ll = log --all --graph --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
102 lo = log --all --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cr)%d\\ \\%C(#c0d6de)%s"
103 ld = log --all --date=format:'%a %d %b' --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cd)%d\\ \\%C(#c0d6de)%s"
104 lg = log --all --graph --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cr)%d\\ \\%C(#c0d6de)%s"
106 stat = !git diff --stat $(git merge-base HEAD \"master\")
107 fh = log --follow -p --
110 f = fetch -v github # verbose mode
111 fs = log github/master ^master # show fetch updates
112 pullrequest = !hub pr show # show pull request
113 issue = !hub issue # show issues
117 be = branch --edit-description
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
130 r = rm -r # remove file
131 adddeleted = !git ls-files --deleted | xargs git add
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