I am writing a pre-receive hook. My remote branch doesn't have any commits yet. My local branch has several commits.
In the hook, I am not able to get all the commits from empty branch until recent commits. I tried
git rev-list <recent-commit>
git rev-list 4b825d..<recent-commit>
as per link (line #32).