mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-06-26 05:21:17 +02:00
many git and repo aliases
This commit is contained in:
parent
7f6cad2c5b
commit
0b2e36f3e7
5 changed files with 25 additions and 2 deletions
|
|
@ -54,6 +54,7 @@ alias cKcssci='cactus kill ; cactus slaves restart ; cactus info'
|
||||||
|
|
||||||
alias m='make'
|
alias m='make'
|
||||||
alias s='subl'
|
alias s='subl'
|
||||||
|
alias a='atom'
|
||||||
|
|
||||||
alias sagiy='sudo apt-get install -y'
|
alias sagiy='sudo apt-get install -y'
|
||||||
alias saguysaguy='sudo apt-get update -y ; sudo apt-get upgrade -y'
|
alias saguysaguy='sudo apt-get update -y ; sudo apt-get upgrade -y'
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ alias rsrra.='repo sync .; repo rebase --auto-stash .'
|
||||||
alias rsarra.='repo sync -a . ; repo rebase --auto-stash .'
|
alias rsarra.='repo sync -a . ; repo rebase --auto-stash .'
|
||||||
compdef _repo rsrra.='repo rebase'
|
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()
|
function rsbrsrra()
|
||||||
{
|
{
|
||||||
if [[ -z $1 ]]; then
|
if [[ -z $1 ]]; then
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,16 @@
|
||||||
root = rev-parse --show-toplevel
|
root = rev-parse --show-toplevel
|
||||||
parents = show --pretty=%P
|
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]
|
[core]
|
||||||
editor = vim
|
editor = vim
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ compdef _git gl=git-pull
|
||||||
# Git pull and rebase
|
# Git pull and rebase
|
||||||
alias gpr='git pull --rebase'
|
alias gpr='git pull --rebase'
|
||||||
compdef _git gpr=git-pull
|
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)
|
# git push (gP)
|
||||||
|
|
@ -61,6 +63,10 @@ compdef _git gPd=git-push
|
||||||
alias gPf='git push --force'
|
alias gPf='git push --force'
|
||||||
compdef _git gPf=git-push
|
compdef _git gPf=git-push
|
||||||
alias gPhm='git push heroku master'
|
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)
|
# Git Fetch (gf)
|
||||||
|
|
@ -238,8 +244,8 @@ compdef _git gwc=git-whatchanged
|
||||||
alias gls='git ls-files | grep'
|
alias gls='git ls-files | grep'
|
||||||
compdef _git gls=git-ls-files
|
compdef _git gls=git-ls-files
|
||||||
|
|
||||||
alias gpoat='git push origin --all && git push origin --tags'
|
alias gPoat='git push origin --all && git push origin --tags'
|
||||||
compdef _git gpoat=git-push
|
compdef _git gPoat=git-push
|
||||||
alias gmt='git mergetool --no-prompt'
|
alias gmt='git mergetool --no-prompt'
|
||||||
compdef _git gmt=git-mergetool
|
compdef _git gmt=git-mergetool
|
||||||
alias gmtvim='git mergetool --no-prompt --tool=vimdiff'
|
alias gmtvim='git mergetool --no-prompt --tool=vimdiff'
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,9 @@ compdef _repo ruc='repo upload'
|
||||||
alias yruc='yes | repo upload --cbr .'
|
alias yruc='yes | repo upload --cbr .'
|
||||||
compdef _repo ruc='repo upload'
|
compdef _repo ruc='repo upload'
|
||||||
|
|
||||||
|
alias rucy='yes | repo upload --cbr .'
|
||||||
|
compdef _repo rucy='repo upload'
|
||||||
|
|
||||||
# Repo start current branch on all projects
|
# 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'
|
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'
|
compdef _repo rscb='repo start'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue