Last active
March 15, 2017 20:35
-
-
Save hampelm/664146f0aa71466a6a52b46ae2eb84cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a new branch | |
# gb my-new-branch | |
alias gb='git branch' | |
# Create a new branch and switch to it | |
# gw a-different-new-branch | |
alias gw='git checkout -b' | |
# Commit changes | |
# gc "Fixed null-concat bug in renderer" | |
alias gc='git commit -am' | |
# Push the current branch | |
alias gp='git push origin $(git symbolic-ref HEAD 2>/dev/null)' | |
# Switch branches | |
# gc a-different-branch | |
alias co='git checkout' | |
# List branches with dates, newest last | |
alias gl="git for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)' | tail" | |
# Undo! Undo! Undo the last commit | |
alias gu="git reset --soft HEAD^" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment