|
|
|
|
|
by evilc00kie
992 days ago
|
|
Ctrl+R is insane but sometimes I have a hard time remembering flags due to overusing it. Especially when crafting new pipelines/solving new problems. But I'd always alias some uncommon tasks and usages. Especially my quirky git ones: # get default branch
alias gdefault='git remote show origin|grep -E HEAD|cut -d" " -f5'
# cd to git root
alias groot='cd "$(git rev-parse --show-toplevel)"'
# Revert last unpushed commit to the state before commiting
alias uncommit="git reset HEAD~1 --soft"
# Show all commits between head and main as one-liner
alias gl1="git log --reverse --oneline HEAD...\`gdefault\`"
|
|