Seenivasan
Seenivasan

Reputation: 101

Git: list all the commits during new branch push and origin of branch creation

I have created and checked out branch test1. i did some changes and commited. assume test1 branch having three commits. now i am creating branch called test2 (test1 is not pushed to central server) and push test2 to central server. as per the below link i am getting all the three commits. but when i push test1 to central server, not listing the three commits.

i want the three commits listed during test1 branch push operation. how do i get it?

How to get a list of incoming commits on git push for a new branch in a hook

Upvotes: 2

Views: 130

Answers (1)

VonC
VonC

Reputation: 1328982

If you created test2 on top of test1, you effectively pushed test1 commits by pushing test2.

The second push (for test1) would not push any new commits. Only test1 pointer on one of those (already pushed) commits.
That explains why your hook didn't list new commits: there was no "$new_sha1".

Upvotes: 1

Related Questions