Compare commits

..

1 Commits

Author SHA1 Message Date
Robin-Charles GUIHENEUF
445fa7dd2c [skip ci] Save: do not merge 2020-10-21 14:39:43 +02:00

View File

@ -62,7 +62,6 @@ alias gcm='git checkout master'
alias gpl='git pull'
alias gph='git push'
alias gsu='git submodule update --init'
alias gcp='git cherry-pick'
alias add='git add'
alias commit='git commit -m "To fixup"'
@ -70,7 +69,7 @@ alias cont='git rebase --continue'
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/"'
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'
@ -115,32 +114,28 @@ function grbi {
git checkout ${PARENT}
git pull
echo "Rebasing on" ${PARENT}
# Back to previous branch
git checkout ${BRANCH}
git rebase --interactive ${PARENT}
git rebase -i ${PARENT}
}
function grbroot {
git rebase --interactive --autosquash --root
}
function ga {
git autofixup HEAD~$1
git rebase --interactive --autosquash HEAD~$1
}
function gai {
# Save parent branch
PARENT=$(git_parent)
echo "Rebasing with autofixup on" ${PARENT}
git autofixup ${PARENT}
git rebase --interactive --autosquash ${PARENT}
}
function ga {
git autofixup HEAD~$1
git rebase --interactive --autosquash HEAD~$1
}
# Git amend
alias amend_pro="GIT_EDITOR=true git rebase --preserve-merges --exec 'git commit --amend --author=\"Robin-Charles GUIHENEUF <rguiheneuf@netatmo.com>\"' $1"
alias amend_perso="GIT_EDITOR=true git rebase --preserve-merges --exec 'git commit --amend --author=\"Robin-Charles Guihéneuf <robin-charles@hotmail.fr>\"' $1"