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

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -