Compare commits
1 Commits
445fa7dd2c
...
1614f5757a
Author | SHA1 | Date | |
---|---|---|---|
|
1614f5757a |
@ -62,6 +62,7 @@ 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"'
|
||||
@ -69,7 +70,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/" | sed "s/[\^~].*//"'
|
||||
alias git_parent='git show-branch | grep "[-\*] \[" | grep -v `git rev-parse --abbrev-ref HEAD` | head -n1 | sed "s/.*\[\(.*\)\].*/\1/"'
|
||||
|
||||
alias log='git log --graph --decorate --oneline'
|
||||
|
||||
@ -114,28 +115,32 @@ function grbi {
|
||||
git checkout ${PARENT}
|
||||
git pull
|
||||
|
||||
echo "Rebasing on" ${PARENT}
|
||||
|
||||
# Back to previous branch
|
||||
git checkout ${BRANCH}
|
||||
git rebase -i ${PARENT}
|
||||
git rebase --interactive ${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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user