Get commit ID for last commit if no tag specified