Last active
February 10, 2019 00:52
-
-
Save ecarlisle/85aa67c3d98ec554a31b48543abad4e6 to your computer and use it in GitHub Desktop.
Git aliases for a shell configuration.
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
# ---------- ADD ---------- # | |
alias ga = git add # Add new or changed files to the index. | |
alias gap = git add -p # Add new or changed files to the index by hunk. | |
# ---------- BRANCHES ---------- # | |
alias gb = git branch # View repository branches. | |
alias gbr = git branch -r # View remote branches. | |
alias gba = bit branch -a # View both local and remote branches. | |
# ---------- CHECKOUT ---------- # | |
alias gco = git checkout # Checkout files. | |
alias gcob = git checkout -b # Checkout a new branch | |
# ---------- COMMIT ---------- # | |
alias gc = git commit # Commit changes. | |
alias gcm = git commit -m # Commit changes with message | |
# ---------- PUSH, PULL, FETCH ---------- # | |
alias gpull = git pull # Pull newer commits to branch. | |
alias gpush = git push # Push newer commits to branch. | |
alias gfetch = git fetch # Get repository branches, tags. | |
alias gmerge = git merge # Merge branches. | |
# ---------- STASH ---------- # | |
alias gstash = git stash # Stash branch changes. | |
alias gstashp = git stash pop # Place stashed state onto current tree state. | |
alias gstashl = git stash list # View list of all branch stashes. | |
# ---------- STATUS ---------- # | |
alias gs = git status # View current branch status. | |
alias gl = git log # View commit log. | |
# ---------- CLONE ---------- # | |
alias gcl = git clone # Clone a repository. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment