Skip to content

Instantly share code, notes, and snippets.

@chriskalmar
Last active June 3, 2019 21:08
Show Gist options
  • Save chriskalmar/c6ffe5ed6aea18be59d9c4361b30de9a to your computer and use it in GitHub Desktop.
Save chriskalmar/c6ffe5ed6aea18be59d9c4361b30de9a to your computer and use it in GitHub Desktop.
git aliases
# delete alias:
# git config --global --unset alias.aliasName
git alias lol 'log --oneline --graph --decorate'
git alias pullbase '!f() { branchName=${1-master}; git checkout $branchName && git pull && git checkout - && git rebase $branchName; }; f'
git alias basepush '!f() { branchName=$(git name-rev --name-only HEAD); echo Merge "$branchName" and push origin; read && git checkout - && read && git merge $branchName && read && git push origin && read && git branch -d $branchName; }; f'
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment