Skip to content

Instantly share code, notes, and snippets.

@christianwish
Last active March 7, 2019 21:18
Show Gist options
  • Save christianwish/13860ace2de2f3616a904e5a28441439 to your computer and use it in GitHub Desktop.
Save christianwish/13860ace2de2f3616a904e5a28441439 to your computer and use it in GitHub Desktop.
Git Aliases
# append changes to last commit
git config --global alias.append 'commit --amend --no-edit'
# print current branch name
git config --global alias.current 'rev-parse --abbrev-ref HEAD'
# fetch develop and merge in current branch
git config --global alias.goodmorning '!git fetch origin ${1-develop} && git merge origin/${1-develop}'
# delete all local branches but nor [BranchName] (default is develop)
# git just [BranchName]
git config --global alias.just '!git checkout ${1-develop} && git branch | grep -v "${1}$" | xargs git branch -D'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment