Natanael Augustin
Natanael Augustin

Reputation: 51

How to find the last commits that were pushed on a branch since the prior push?

Using git log --name-status gives all the commits on that branch.

Using git log -1 --name-status gives only the last commit.

I want to get the last commits that were in the last push. Even knowing how many commits there were in the last push would help me because I can parametrize the command with -n.

The answer at this question does not help me. Using git whatchanged does not help me too much either.

Upvotes: 1

Views: 1677

Answers (1)

Paul-Marie
Paul-Marie

Reputation: 1063

Just add --remotes at the end of your command line, like:

 git log -1 --name-status --remotes

Upvotes: 3

Related Questions