The short and rather unsatisfying answer is "you can't". Commit B inherently depends on commit A because A is B's parent commit.
What you can do is stop using commit B at all. Construct a third commit—call it C—whose parent is the parent of A, and whose content is whatever content you want. (This could match B's content, for instance, or not.) Then move the name of the branch so that instead of pointing to commit B (which points back to A, which points back to older commits), the name points to new commit C:
B--A [no longer on your branch - abandoned in favor of C] / ...--o--C <-- branch
You can now git push origin branch to push commit C, without using commits A and B at all.
(Note that the precise mechanics for making commit C depend on what snapshot you want to have attached to C.)
git rebaseand skip the commit you don't want.git rebase, as Jaa-c commented, may work, but it works by creating a new commit which doesn't specify A as its parent.