new git functions and aliases added

This commit is contained in:
Sameer Rahmani 2015-01-05 20:50:49 +03:30
parent 5eff2dc2e2
commit 434e4db4ac
2 changed files with 17 additions and 2 deletions

View File

@ -33,15 +33,18 @@ alias k="kuso"
alias g="git"
alias gl="git pull"
alias gp="git push"
alias push="git_push"
alias pull="git_pull"
alias kff="kernel_find_file"
alias ls='ls --color'
alias ll='ls -l'
alias la='ls -lA'
alias ll='ls -lh'
alias la='ls -lhA'
alias sl=ls
alias ...='cd ../..'
alias ....='cd ../../..'
alias -- -='cd -'
alias _="sudo"

View File

@ -127,6 +127,18 @@ function git_compare_version() {
echo 1
}
function git_current_branch() {
git branch |grep "*"|cut -d ' ' -f 2
}
function git_push() {
git push origin `git_current_branch`
}
function git_pull() {
git pull origin `git_current_branch`
}
#this is unlikely to change so make it all statically assigned
POST_1_7_2_GIT=$(git_compare_version "1.7.2")
#clean up the namespace slightly by removing the checker function