mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 07:15:37 +00:00
evaluate gpp upstream on cli
This commit is contained in:
parent
249cbe5889
commit
e4b6c3c9ba
@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Copied from David Pedersen: https://github.com/davidpdrsn/dotfiles/blob/master/bin/git-pp
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
git_branch_name() {
|
|
||||||
val=$( git branch 2>/dev/null | grep '^\*' | colrm 1 2 )
|
|
||||||
echo "$val"
|
|
||||||
}
|
|
||||||
|
|
||||||
git push --set-upstream origin "$(git_branch_name)"
|
|
@ -30,7 +30,7 @@ function abbrs --description 'All abbreviations'
|
|||||||
abbr -a gca 'git commit --amend'
|
abbr -a gca 'git commit --amend'
|
||||||
abbr -a gu 'git pull'
|
abbr -a gu 'git pull'
|
||||||
abbr -a gp 'git push'
|
abbr -a gp 'git push'
|
||||||
abbr -a gpp 'git_set_upstream'
|
abbr -a gpp git push --set-upstream origin (git branch 2>/dev/null | grep '^\*' | colrm 1 2)
|
||||||
abbr -a gl 'git log --graph --decorate --oneline -20'
|
abbr -a gl 'git log --graph --decorate --oneline -20'
|
||||||
abbr -a gll 'git log --graph --decorate --oneline'
|
abbr -a gll 'git log --graph --decorate --oneline'
|
||||||
abbr -a gco 'git checkout'
|
abbr -a gco 'git checkout'
|
||||||
@ -43,7 +43,7 @@ function abbrs --description 'All abbreviations'
|
|||||||
abbr -a grh 'git reset --hard'
|
abbr -a grh 'git reset --hard'
|
||||||
abbr -a gm 'git merge'
|
abbr -a gm 'git merge'
|
||||||
abbr -a gcp 'git cherry-pick'
|
abbr -a gcp 'git cherry-pick'
|
||||||
abbr -a cdg 'cd (git rev-parse --show-toplevel)'
|
abbr -a cdg cd (git rev-parse --show-toplevel)
|
||||||
|
|
||||||
# GitHub
|
# GitHub
|
||||||
abbr -a ghr 'gh repo view -w'
|
abbr -a ghr 'gh repo view -w'
|
||||||
|
Loading…
Reference in New Issue
Block a user