1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

git: Add mv/reflog/clean-merged aliases

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
Joe Groocock 2022-10-24 14:29:40 +00:00
parent cbb44c99ee
commit 56fd0ad602
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
2 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,7 @@ alias gau="git add -u"
alias gaN="git add -N" alias gaN="git add -N"
alias gaa="ga -A" alias gaa="ga -A"
alias grm="git rm" alias grm="git rm"
alias gmv="git mv"
alias gc="git commit -s" alias gc="git commit -s"
alias gcm="git commit -s -em" alias gcm="git commit -s -em"
alias gca="git commit -s --amend --date=\"\$(date -R)\"" alias gca="git commit -s --amend --date=\"\$(date -R)\""
@ -126,6 +127,7 @@ alias gcn="git commit -s --no-edit"
alias gcan="gca -s --no-edit" alias gcan="gca -s --no-edit"
alias gcam="gca -s -m" alias gcam="gca -s -m"
alias gst="git status" alias gst="git status"
alias grl="git reflog"
alias gm="git merge" alias gm="git merge"
alias gma="git merge --abort" alias gma="git merge --abort"
@ -175,6 +177,7 @@ alias glog="git log --color --oneline --decorate --graph"
alias grst="git reset" alias grst="git reset"
alias gundo="git reset --keep @~1" alias gundo="git reset --keep @~1"
alias gclean="git clean" alias gclean="git clean"
alias gclm="git cleanmerged"
alias gbr="git branch" alias gbr="git branch"
alias gbrl="git for-each-ref --sort=committerdate refs/heads/ --format=\"%(refname:short)\" | fzf -x --ansi --multi --preview-window=right:70% --preview=\"git log --format=fuller --stat --color=always {} | head -n\$((\$(tput lines)*10))\"" alias gbrl="git for-each-ref --sort=committerdate refs/heads/ --format=\"%(refname:short)\" | fzf -x --ansi --multi --preview-window=right:70% --preview=\"git log --format=fuller --stat --color=always {} | head -n\$((\$(tput lines)*10))\""
alias gtg="git tag" alias gtg="git tag"

View File

@ -38,6 +38,7 @@
unpushed = !git log --oneline @{u}..HEAD unpushed = !git log --oneline @{u}..HEAD
leaders = !git shortlog -s -n --all --no-merges leaders = !git shortlog -s -n --all --no-merges
defbranch = !git symbolic-ref refs/remotes/origin/HEAD | sed \"s@^refs/remotes/origin/@@\" defbranch = !git symbolic-ref refs/remotes/origin/HEAD | sed \"s@^refs/remotes/origin/@@\"
cleanmerged = !git branch --merged \"origin/$(git defbranch)\" | grep -ve \"^\\\\*\" -e \"^. $(git defbranch)$\" | xargs -r git branch -d
[advice] [advice]
statusHints = false statusHints = false
pushUpdateRejected = false pushUpdateRejected = false