What's the difference between the output from rev-parse and symbolic-ref?

Viewed 1248

I've run into 2 different ways for git to tell me the current branch:

git rev-parse --abbrev-ref HEAD

and

git symbolic-ref --short HEAD

Ehh.. what do both do exactly and when would they differ, if at all?

1 Answers
Related