Commit b7c66934 authored by jimbo-on-ruby's avatar jimbo-on-ruby

Add and reorganise git aliases

parent 557f3250
......@@ -8,28 +8,55 @@ history_function() {
history | grep $1 | less -R
fi
}
#possible future categories:
#-server administration commands e.g. cpu load, processes running
#-networking
alias h='history_function'
#GIT
##git add commit push
alias gacp='git add -A && git commit -v && git push'
alias gac='git add -A && git commit -v'
alias gcap='git commit -av && git push'
alias gca='git commit -av'
#git add commit push
#-v = verbose it displays all changes in the text editor where you write the commit message
#--amend adds this commit to your last commit. basically the same as git rebase -i HEAD~1
alias gacp='git add -A && git commit -v && git push'
alias gac='git add -A && git commit -v'
alias gcap='git commit -av && git push'
alias gca='git commit -av'
alias gcampf='git commit -a -v --amend && git push -f'
#display unpushed commit
alias gcy='git cherry -v' #mb find a command that doesn't display the whole SHA
#display uncommited changes
alias gd='git diff'
alias gc='git checkout'
alias gp='git pull'
alias gpa='git pull --all'
#show untracked files
alias guf='git ls-files --others --exclude-standard'
alias git_delete_remote_branch='git push origin --delete' #followd by branch name
alias git_show_merged_branches='git branch -r --merged'
alias git_stale_branches='git branch --no-merged'
#branching
#switch branch
alias gc='git checkout'
#create new branch
alias gcb='git checkout -b'
#delete branches
#merged branches
alias gbd='git branch -d'
#stale / unmerged branches
alias gbD='git branch -D'
alias git_delete_remote_branch='git push origin --delete'
alias git_show_merged_branches='git branch -r --merged'
alias git_show_stale_branches='git branch --no-merged'
alias git_add_new_remote_branc='git push --set-upstream origin'
##git log
#git log
alias glop='git log --color=always --graph --pretty=format:"%h - %an, : %s"| less -R'
alias glos='git log --oneline --graph --stat --decorate --color=always | less -R'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment