# Important: ~/.config/shell/aliases.sh loads all git aliases with
# less than 7 characters into the shell's "namespace" with a "g" prefix
# Example: git add <=> git a <=> ga
a = add
ap = add --patch
bi = bisect
br = branch
bra = branch --all
brd = branch --delete
brdd = branch --delete --force
brm = branch --move
cf = cat-file
ci = commit
cim = commit --message
cl = clone
co = checkout
cob = checkout -b
cod = checkout develop
com = checkout master
cp = cherry-pick
de = describe --tags
df = diff
fe = fetch
lg = log
lga = log --all
mb = merge-base
me = merge
mea = merge --abort
mec = merge --continue
mefeat = "!f() { if [ $# -eq 0 ]; then echo "Must specify a branch to merge in"; exit 1; fi; git check-pull; if [ $? -gt 0 ]; then echo "$1 must be rebased first"; exit 1; fi; cb=$(git current-branch) && printf '# SUBJECT\n# =======\n# - what does the commit do\n# - capitalize the first word and use the\n# imperative mood (e.g. "Add" vs "Adds")\n# - do not end the line with a period\n# - start with "Fix" for any hotfixes\n# ========= 50 characters / 1 line ============= |\nMerge in \"%s\"\n# ============================================== |\n\n\n# BODY (optional)\n# ===============\n# - explain what the commit does, why it does it, and how\n# - do not format the text (e.g., Markdown or reStructuredText)\n# - use multiple lines starting with "-" as bullet points\n# - link to external resources for even more context where appropriate\n# ========= 72 characters / multiple lines (and paragraphs) ========== |\nMerge branch \"%s\" into \"%s\"\n\nSummary of the merged in commits:\n' $1 $1 $cb > .merge_msg.txt.tmp && git log --format=format:' * %h: %s' $cb..$1 >> .merge_msg.txt.tmp && printf '\n\n\n# ==================================================================== |\n\n\n# GITHUB ISSUE (optional)\n# =======================\n# - uncomment and adapt one of the lines below\n# - use the "closes" keyword if applicable\n# (see https://help.github.com/en/articles/closing-issues-using-keywords)\n#\n# Related GitHub issue: #21\n# This commit closes #42 on the GitHub issue tracker\n\n\n#\n# END\n#\n' >> .merge_msg.txt.tmp && git merge --no-ff --no-commit $1 && SKIP=no-commit-to-branch git commit --edit --file=.merge_msg.txt.tmp; rm -f .merge_msg.txt.tmp; }; f"
meff = merge --ff-only
menoff = merge --no-ff
pl = pull
plrb = pull --rebase
ps = push
psf = push --force
rb = rebase --committer-date-is-author-date
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
rbq = rebase --quit
rbs = rebase --skip
rl = reflog
rm = rm # To make it available as the grm alias
rp = rev-parse
rs = reset
rv = revert
s = status
ss = status --short
sh = show
st = stash
sta = stash push --include-untracked # push does not go into the shortcut!
stam = stash push --include-untracked --message
stapp = stash apply
stl = stash list
stp = stash pop
stsh = stash show
# Provide an overview of all aliases. Second one is for use in ~/.bashrc