]>
Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/git-rel
2 # Usage: git-rel [<ref>]
3 # Shows the relationship between the current branch and <ref>. With no <ref>,
4 # the current branch's remote tracking branch is used.
21 git symbolic-ref
-q HEAD
|
26 remote
=$
(git config
--get branch.$
(current_branch
).remote
)
27 merge
=$
(git config
--get branch.$
(current_branch
).merge
)
28 echo "$remote/$(strip_prefix $merge)"
31 ref
="${1:-$(tracking_branch)}"
33 git rev-list
--left-right --abbrev-commit --abbrev $ref...HEAD
|