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
101 # git push origin :refs/tags/old
103 # git tag <tag name> <tag name>^{} -f -a -s
106 ll = log --all --graph --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)<%an>\\ %C(#c0d6de)%s\\ %C(#17b062)%d"
107 lgpg = log --all --graph --pretty=format:"%C(#0080ff)%h\\ %C(#cd9a00)%G?\\ \\%C(#c0d6de)%s\\%C(#17b062)%d"
108 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"
109 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"
110 find = log --all --pretty=format:"%C(#0080ff)%h\\ \\%C(#c0d6de)%s\\%C(#17b062)%d" --name-status --grep
111 stat = !git diff --stat $(git merge-base HEAD \"master\")
112 fh = log --follow -p --
116 f = fetch --prune -v github # verbose mode
117 fs = log github/master ^master # show fetch updates
121 be = branch --edit-description
122 show-unmerged-branches = branch --no-merged master
123 show-merged-branches = branch --merged master
124 delete-remote-branch = push -d github #branch name
125 # delete-remote-branch = push --delete github #branch name
126 show-ahead = rev-list --count master...
127 # git push -f origin $old_commit_id:master # change remote branch
128 # git reset --hard origin/<branch_name> # force sync with remote
129 # git branch -m old-name new-name # rename branches
130 # git remote rename origin destination # rename remote
131 # git remote set-url origin git@github.com:USERNAME/REPOSITORY.git # rename remote url
134 r = rm -r # remove file
135 adddeleted = !git ls-files --deleted | xargs git add
137 unstage-file = restore --staged
138 uncommit = reset --soft HEAD
139 # forcerestore = !git reset --hard HEAD $1 && git clean -f
140 # git reset --hard github/master
142 # Track Ignore files dirs
143 untrack= rm -r --cached --ignore-unmatch
144 retrack = update-index --no-assume-unchanged
145 show-untracked = ls-files . --exclude-standard --others
146 show-ignored = ls-files . --ignored --exclude-standard --others
147 # show-file = show 00c7250:sfm.c | vim - -n
149 # interactive staging
150 addi = add --interactive
157 # k = git remote prune github
158 # reflog expire --all --expire=now
159 k = gc --prune=now --aggressive
161 helper = cache --timeout=600