3 email = hassan@afify.dev
4 signingkey = E7855210AD9062A0
8 excludesfile = ~/.config/git/.gitignore
34 template = ~/.config/git/.gitmessage
55 s = status --short --branch
63 chp = cherry-pick -e #hash..#otherhashrange # choose a commit from one branch and apply it onto another
64 show-unmerged-commits = cherry -v master #branch
65 merge-aboard = merge --abort
66 # show-unmerged-fullcommits = !git log $1 --not master --stat && echo
69 p = push github master
70 pushall = !git remote | xargs -L1 git push
71 show-unpushed-branches = log --branches --not --remotes --simplify-by-decoration --decorate --oneline
72 # show-unpushed-commits =
76 create-diff = !sh ~/.scripts/create_diff_git.sh
77 apply-diff = !result=$(ls *.diff | dmenu -p 'select diff file' -l 10) && git apply $result
78 # df = difftool master..otherbr -- filename
81 c = commit -S # commit and sign
82 cedit = !git commit --amend && git push --force github master # edit last commit message
83 # commit_old = commit --date "Wed Feb 16 14:00 2020 +0100" -S
84 # git show commit:filename # show_file_old_commit
87 t = tag -a -s #tagname # create annotated tag
88 tlight = tag -s #tagname #commit_name # create lightweight tag
89 tc = !git tag -a -s -m "v$(awk '/^VERSION/{print $NF}' config.mk)" \
90 v$(awk '/^VERSION/{print $NF}' config.mk) # new tag C
91 push-tag = push github #tagname
92 pushall-tags = push github --tags
93 fetch-tag = fetch --tags
94 delete-tag = tag --delete # tagname
95 delete-remote-tag = push --delete github # tagname
98 tag-tobranch = checkout -b tag_temp_branch #tagname
102 # git push origin :refs/tags/old
104 # git tag <tag name> <tag name>^{} -f -a -s
107 l = log --all --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
108 lc = log --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
109 lgpg = log --all --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)%G?\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
110 # ll = log --all --graph --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
111 ll = log --all --graph --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
112 lo = log --all --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cr)%d\\ \\%C(#c0d6de)%s"
113 ld = log --all --date=format:'%a %d %b' --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cd)%d\\ \\%C(#c0d6de)%s"
114 lg = log --all --graph --pretty=format:"%C(#cd9a00)%h\\%C(#0080ff)\\ <%an>\\ %C(#17b062)(%cr)%d\\ \\%C(#c0d6de)%s"
116 stat = !git diff --stat $(git merge-base HEAD \"master\")
117 fh = log --follow -p --
118 find = log --all --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d" --name-status --grep
121 f = fetch -v github # verbose mode
122 fs = log github/master ^master # show fetch updates
123 pullrequest = !hub pr show # show pull request
124 issue = !hub issue # show issues
128 be = branch --edit-description
129 show-unmerged-branches = branch --no-merged master
130 show-merged-branches = branch --merged master
131 delete-remote-branch = push -d github #branch name
132 # delete-remote-branch = push --delete github #branch name
133 show-ahead = rev-list --count master...
134 # git push -f origin $old_commit_id:master # change remote branch
135 # git reset --hard origin/<branch_name> # force sync with remote
136 # git branch -m old-name new-name # rename branches
137 # git remote rename origin destination # rename remote
138 # git remote set-url origin git@github.com:USERNAME/REPOSITORY.git # rename remote url
141 r = rm -r # remove file
142 adddeleted = !git ls-files --deleted | xargs git add
144 unstage-file = restore --staged
145 uncommit = reset --soft HEAD
146 # forcerestore = !git reset --hard HEAD $1 && git clean -f
147 # git reset --hard github/master
149 # Track Ignore files dirs
150 untrack= rm -r --cached --ignore-unmatch
151 retrack = update-index --no-assume-unchanged
152 show-untracked = ls-files . --exclude-standard --others
153 show-ignored = ls-files . --ignored --exclude-standard --others
155 # interactive staging
156 addi = add --interactive
163 k = git remote prune github