Taking last commit from branch instead of HEAD when deploying a branch.