Files
linux-config/aliases/.git_aliases
Kevin Mok 568aa72b5b Forked vim-snippets and transferred snippets
I wanted to alter the default snippets so I thought I might as well move
all mine into there as well, instead of keeping track of changes in 2
repositories.

Also, having become comfortable with Vim folding, I thought it'd be more
organized to consolidate similar alias files (i.e. 209 -> school,
laptop/my_pc -> pc) and then add folding to the top-level files.
2018-02-06 18:32:15 -05:00

39 lines
976 B
Plaintext

# Aliases {{{
# . ~/.secure
alias gs="git status -u"
alias gpl="git pull --rebase"
alias grbc="git rebase --continue"
alias gps="git push"
alias vig="vi .gitignore"
alias ga="git add -A * && gs"
alias gai="git add .gitignore"
alias gd="git diff -w"
alias gdc="git diff --cached"
alias gstore="git config credential.helper store"
gcm(){ git commit -m "$1" ; }
alias gc="git commit"
alias gl="git log"
alias gsl="git shortlog"
alias gst="git stash"
alias gstp="git stash pop"
alias gclear="git stash clear"
alias egc="vim -c \"set syn=gitcommit\" -c \"set tw=72\" commit-msg.txt"
# Aliases }}}
# Functions {{{
gcho() { git checkout $1 ; }
gcln() { git clone $1 ; }
gremotes() {
git remote set-url --add --push origin $1
git remote set-url --add --push origin $2
}
gmrgr() {
# 1 = remote name, 2 = remote path
git remote add $1 $2
git fetch $1
# whichever branch you want to merge
git merge --allow-unrelated-histories $1/master
git remote remove $1
}
# Functions }}}