GIT: Remove specific commit from branch

Keywords: git github

Question: 

this is my Git remote repository from Github:

      1  [origin/branch1]
     /
A - B [origin/master]

I want to remove commit A to make repository become like this:

   1  [origin/branch1]
  /
B [origin/master]

I am using a Macbook and Source Tree application. Please help me!

Answers: