git - How to get the SHA1 for the tip of a branch origin? (without having to switch to it) -
how can sha1 tip of origin accessed?
for example local branch may behind not being current when git pull runs, or may not checked out.
to give context, i'm looking print log of commits doesn't depend on state of local branches.
if you're looking @ branch off origin called <branch>, use git rev-parse origin/<branch> sha head of branch.
Comments
Post a Comment