mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-12-26 09:11:30 +01:00
zsh: add git-fixup command (git fixup)
This commit is contained in:
parent
f2850c54f1
commit
24999c4776
|
@ -66,8 +66,7 @@ alias gl5='git log -n 5'
|
|||
alias pvim='poetry run vim'
|
||||
|
||||
alias gs='git status'
|
||||
alias gcf='git commit --fixup=HEAD'
|
||||
alias gcaf='git commit -a --fixup=HEAD'
|
||||
alias gcfx='git-fixup'
|
||||
alias gls="git log --pretty=oneline --abbrev-commit" # gls: Git Log Short
|
||||
|
||||
alias watcha='watch ' # note the space after watch. This makes watch work with aliases
|
||||
|
|
|
@ -306,7 +306,6 @@ function fgitlog() {
|
|||
git log --oneline $@ | fzf --multi --preview 'git -p show --color=always {+1}' --preview-window=right,60%
|
||||
}
|
||||
|
||||
compdef _git fgitlog=git-log
|
||||
git-commit-show() {
|
||||
git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" |
|
||||
fzf --ansi --no-sort --reverse --tiebreak=index --preview \
|
||||
|
@ -322,6 +321,12 @@ git-commit-show() {
|
|||
--preview-window=right:60%
|
||||
}
|
||||
|
||||
compdef __git_recent_commits git-fixup
|
||||
git-fixup() {
|
||||
git commit --fixup=$1
|
||||
git -c sequence.editor=true rebase --interactive --autosquash $1^
|
||||
}
|
||||
|
||||
# dotfiles user functions
|
||||
if [[ -f $HOME/.dotfiles_functions ]]; then
|
||||
source "$HOME/.dotfiles_functions"
|
||||
|
|
Loading…
Reference in New Issue
Block a user