Q:

Git merge the two commit messages into one message

I'm beginner in GIT. I did some changes in my working project and created the the test branch using 
git checkout -b 'test'

I committed my changes twice.
git add .
git commit -m "first commit"
git push --set-upstream origin test

Again I did some changes and committed changes
git add .
git commit -m "second commit"
git push --set-upstream origin test

Now I created pull request . What exactly want is, I have two commits now. When I merge into master branch, I dont want see those two commit messages, I want to merge those messages "first commit" and "second commit" into one message and merge into master branch.
I tried rebase and rest commands. May be I'm using in wrong way. Can any one help me out this. 

A:

if you want to merge two last commits into one with a given name
git reset --soft "HEAD^"
git commit --amend

