Skip to content

Commit

Permalink
git: Add lb alias (shorter lob)
Browse files Browse the repository at this point in the history
  • Loading branch information
lindhe committed Jul 23, 2024
1 parent 939e068 commit 6192541
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
gh = "!git clone https://github.com/${1}.git #"
h = help
l = log --oneline --show-linear-break='Non-linear history:'
lb = "!git log --oneline --graph --color=always $(git mb)~1.. $(git default-branch) HEAD"
lob = log --oneline --graph --branches --color=always
mb = "!git merge-base $(git default-branch) HEAD"
nb = "!git switch -c lindhe/${1:?} #"
nuke-branch = "!git worktree remove ${*} && git branch -D ${*} #"
nwt = "!WTD=~/git/worktree/${1:?}; (git branch -l ${1:?} | grep -q ${1:?}) || echo ERROR: Branch ${1:?} not found 1>&2 && mkdir -p ${WTD} && git worktree add ${WTD} ${1:?} && echo ${WTD} #"
Expand Down

0 comments on commit 6192541

Please sign in to comment.