many git and repo aliases

This commit is contained in:
Gaetan Semet 2016-07-13 15:02:04 +02:00
commit 0b2e36f3e7
5 changed files with 25 additions and 2 deletions

View file

@ -54,6 +54,7 @@ alias cKcssci='cactus kill ; cactus slaves restart ; cactus info'
alias m='make'
alias s='subl'
alias a='atom'
alias sagiy='sudo apt-get install -y'
alias saguysaguy='sudo apt-get update -y ; sudo apt-get upgrade -y'

View file

@ -16,6 +16,9 @@ alias rsrra.='repo sync .; repo rebase --auto-stash .'
alias rsarra.='repo sync -a . ; repo rebase --auto-stash .'
compdef _repo rsrra.='repo rebase'
alias gPoHrfm='git push origin HEAD:refs/for/master'
alias git-push-refs-for-master='git push origin HEAD:refs/for/master'
function rsbrsrra()
{
if [[ -z $1 ]]; then

View file

@ -38,6 +38,16 @@
root = rev-parse --show-toplevel
parents = show --pretty=%P
# For Git hub - uncomment if you don't have git extras
#
# Easily checkout local copies of pull requests from GitHub remotes:
#
# git pr 4 - creates local branch pr/4 from the origin remote and checks it out
# git pr 4 upstream - creates local branch pr/4 from upstream remote and checks it out
# git pr-clean - removes all pr/* branches from your local repo
# pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
# pr-clean = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
[core]
editor = vim

View file

@ -38,6 +38,8 @@ compdef _git gl=git-pull
# Git pull and rebase
alias gpr='git pull --rebase'
compdef _git gpr=git-pull
# Git rebase current master branch against master branch on upstream
alias gprum='git pull --rebase upstream master'
###############
# git push (gP)
@ -61,6 +63,10 @@ compdef _git gPd=git-push
alias gPf='git push --force'
compdef _git gPf=git-push
alias gPhm='git push heroku master'
# git push origin
alias gPof='git push origin'
# git push origin force
alias gPof='git push origin --force'
################
# Git Fetch (gf)
@ -238,8 +244,8 @@ compdef _git gwc=git-whatchanged
alias gls='git ls-files | grep'
compdef _git gls=git-ls-files
alias gpoat='git push origin --all && git push origin --tags'
compdef _git gpoat=git-push
alias gPoat='git push origin --all && git push origin --tags'
compdef _git gPoat=git-push
alias gmt='git mergetool --no-prompt'
compdef _git gmt=git-mergetool
alias gmtvim='git mergetool --no-prompt --tool=vimdiff'

View file

@ -32,6 +32,9 @@ compdef _repo ruc='repo upload'
alias yruc='yes | repo upload --cbr .'
compdef _repo ruc='repo upload'
alias rucy='yes | repo upload --cbr .'
compdef _repo rucy='repo upload'
# Repo start current branch on all projects
alias rscb='echo "Starting branch $(git branch | sed -n "/\* /s///p") on all projects" && repo start $(git branch | sed -n "/\* /s///p") --all'
compdef _repo rscb='repo start'