2021-07-24 10:21:03 -04:00
|
|
|
REMOTE_URL=$(git remote get-url --push origin)
|
2021-08-25 15:32:15 -04:00
|
|
|
COMMITS=$(git reflog -2 $(git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)) --pretty=format:%h | xargs printf '%s <- %s')
|
2021-07-24 10:21:03 -04:00
|
|
|
CURRENT_BRANCH=$(git branch --show-current)
|
|
|
|
UPSTREAM_BRANCH=$(git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD) | sed 's#^[^/]*/##g')
|
|
|
|
echo "On $REMOTE_URL:
|
|
|
|
$COMMITS ($CURRENT_BRANCH -> $UPSTREAM_BRANCH)"
|
|
|
|
|