Is there a function in magit to check if a branch is in sync with with it's remote (basically I want to check if both branches sit on the same commit)

At the moment I check if remote branch and the local one are sitting on the same commit, but maybe there is something I could not find yet inside magit already?

(s-equals? (magit-rev-parse (magit-get-current-branch))
           (magit-rev-parse (magit-get-push-branch)))

1 Answer 1


It doesn't take you all the way, but magit-rev-eq helps here:

(magit-rev-eq (magit-get-current-branch)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.