Skip to content

Instantly share code, notes, and snippets.

@syntax-punk
Last active May 6, 2024 13:44
Show Gist options
  • Save syntax-punk/eca9711b073a6f28d262cb9b6ce87e44 to your computer and use it in GitHub Desktop.
Save syntax-punk/eca9711b073a6f28d262cb9b6ce87e44 to your computer and use it in GitHub Desktop.
terminal tricks
// git alias is useful for creating personal short git commands which combine several commands
// alias can be added both locally in the project (git config --local -e)
// and globally to the git user on the given machine (git config --global -e)
[alias]
adog = log --all --decorate --oneline --graph
cob = checkout -b
wip = commit -am "WIP"
undo = reset --soft HEAD~1
hdr = "!f(){ git checkout main && git pull && git checkout - && git rebase main; };f"
rimbr = "!git checkout main && git branch | grep -v "main" | xargs git branch -D"
ec = config --local -e
eg = config --global -e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment