I have only five commits in my local git repository. Out of five commits, I want to push 4 commits rather than pushing the last commit, is that possible?
use refspec:
git push origin HEAD^:master