Closed salcode closed 7 months ago
I'm not sure I'm a fan of including git pull
in this alias.
Perhaps we should eliminate git pull
with the idea that updating branches should be handled by the user.
A user could eliminate the need for the second pull by running git fetch --all
first and then use origin/main
instead of just main
,
Instead of git is-up-to-date-with
should we change the name to something like git has-diverged-from
(which would give us the opposite answer)?
I often want to know if my current branch (e.g.
feat/a
) is up to date with another branch (e.g.main
).In this case, I typically run something like
and I look to see if
main
appears in the log history offeat/a
.We've already introduced git can-ff-merge, which could be used to determine if
feat/a
intomain
is a fast-forward merge but it would be nice to have a separate alias to check if up to date.Perhaps something like
git is-up-to-date-with main
or something similar.