mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
git: Dynamically identify the "default" branch
This broadly assumes that the "default" remote is called "origin", but that's better than assuming that plus the default branch name. Thanks to https://joshtronic.com/2020/08/09/how-to-get-the-default-git-branch/ Suggested-by: Chris Lane <chris@chrislane.com> Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
@ -37,6 +37,7 @@
|
||||
count = !echo $(pwd) && git rev-list HEAD --count
|
||||
unpushed = !git log --oneline @{u}..HEAD
|
||||
leaders = !git shortlog -s -n --all --no-merges
|
||||
defbranch = !git symbolic-ref refs/remotes/origin/HEAD | sed \"s@^refs/remotes/origin/@@\"
|
||||
[advice]
|
||||
statusHints = false
|
||||
pushUpdateRejected = false
|
||||
|
Reference in New Issue
Block a user