Skip to content

difference between base_sha and sha parameter #1086

Answered by jackton1
kishaningithub asked this question in Q&A
Discussion options

You must be logged in to vote

@kishaningithub The base_sha would be the starting point for the comparison i.e "from sha" which is represented in the image above as "master" which can either be denoted by the branch name or the commit SHA.

The sha on the other hand is the endpoint for the comparison i.e "to sha" which is represented in the image above as "dev" which can either be denoted by the branch name or the commit SHA.

NOTE: Both are automatically calculated when omitted.

A diff is performed using the common ancestor of both branches i.e the point at which both branches diverge.

See: https://git-scm.com/docs/git-diff#_examples for more examples

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jackton1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants