Closed salcode closed 1 month ago
I'm a big fan of the git is-up-to-date-with alias added in #28
git is-up-to-date-with
e.g.
$ git is-up-to-date-with main Yes, this branch is up to date with main
I'm glad this alias supports - for the previous branch 🎉
-
What I don't like is using - displays @{-1} instead of the branch name 🙁
@{-1}
$ git is-up-to-date-with - Yes, this branch is up to date with @{-1}
I think if we replace
https://github.com/salcode/salcode-git/blob/49d973dadedddf789f1ebd01f2a44cadbdd3ef5f/gitconfig#L24
with
branch=$(git rev-parse --abbrev-ref @{-1}); \
it will output the branch name when using -
$ git is-up-to-date-with - Yes, this branch is up to date with main
We should probably update https://salferrarello.com/is-git-branch-up-to-date/ with this change as well.
I'm a big fan of the
git is-up-to-date-with
alias added in #28e.g.
It Supports the Previous Branch with -
I'm glad this alias supports
-
for the previous branch 🎉What I don't like is using
-
displays@{-1}
instead of the branch name 🙁Possible Solution
I think if we replace
https://github.com/salcode/salcode-git/blob/49d973dadedddf789f1ebd01f2a44cadbdd3ef5f/gitconfig#L24
with
it will output the branch name when using
-
e.g.
Related Work
We should probably update https://salferrarello.com/is-git-branch-up-to-date/ with this change as well.