Compare commits

..

1 Commits

Author SHA1 Message Date
Robin-Charles GUIHENEUF
3b8e08ebd3 [skip ci] Save: do not merge 2020-10-21 14:38:26 +02:00

View File

@ -56,11 +56,13 @@ function s_clean {
alias vpn="sudo openvpn --config $HOME/Nextcloud/#\ -\ Configs/rguiheneuf.ovpn" alias vpn="sudo openvpn --config $HOME/Nextcloud/#\ -\ Configs/rguiheneuf.ovpn"
# Git # Git
alias gs='git status' alias gst='git status'
alias gc='git checkout' alias gc='git checkout'
alias gcm='git checkout master' alias gcm='git checkout master'
alias gpl='git pull' alias gpl='git pull'
alias gph='git push' alias gph='git push'
alias pull='git pull'
alias push='git push'
alias gsu='git submodule update --init' alias gsu='git submodule update --init'
alias add='git add' alias add='git add'
@ -69,10 +71,6 @@ alias cont='git rebase --continue'
alias branch_clean='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d' alias branch_clean='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
alias git_parent='git show-branch | grep "\*" | grep -v `git rev-parse --abbrev-ref HEAD` | head -n1 | sed "s/.*\[\(.*\)\].*/\1/" | sed "s/[\^~].*//"'
alias log='git log --graph --decorate --oneline'
function branch_create { function branch_create {
git checkout -b $1 git checkout -b $1
git push -u origin $1 git push -u origin $1
@ -93,42 +91,36 @@ function tag_replace {
git push origin $1 git push origin $1
} }
function grb {
git rebase -i HEAD~$1
}
function g_save { function g_save {
git add * git add *
git commit -m "[skip ci] Save: do not merge" git commit -m "[skip ci] Save: do not merge"
git push -f git push -f
} }
function grb { function grbm {
git rebase -i HEAD~$1 # Save actual branch
}
function grbi {
# Save current branch
BRANCH=$(git branch | grep \* | cut -d ' ' -f2) BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
# Save parent branch # Checkout master & pull
PARENT=$(git_parent) git checkout master
# Checkout parent & pull
git checkout ${PARENT}
git pull git pull
# Back to previous branch # Back to previous branch
git checkout ${BRANCH} git checkout ${BRANCH}
git rebase -i ${PARENT} git rebase -i master
} }
function grbroot { function grbr {
git rebase --interactive --autosquash --root git rebase --interactive --autosquash --root
} }
function gai { function gam {
# Save parent branch git autofixup master
PARENT=$(git_parent) git rebase --interactive --autosquash master
git autofixup ${PARENT}
git rebase --interactive --autosquash ${PARENT}
} }
function ga { function ga {