adimoh
adimoh

Reputation: 728

Git Hash value of last un-pushed local commit

I have 3 local commits on my branch mainline which are ahead of the remote repo. How to get the hash value of the earliest local commit?

Example:

A <- HEAD(mainline) local
B
C
D <- origin/mainline synced with remote

How to get hash value of commit C?

Upvotes: 1

Views: 203

Answers (1)

EncryptedWatermelon
EncryptedWatermelon

Reputation: 5598

git log --pretty=%H origin/master..HEAD |tail -n1

Upvotes: 2

Related Questions