In a somewhat long-winded sequence of events caused by local, test and development repositories going out of sync, I ended up making some commits which now need to be deleted.
In particular, the latest commit, call it A is the one that needs to be deleted. Commit that precedes it, call it B is the one on which the HEAD is located.
When I run git status
I get
Not currently on any branch. nothing to commit (working directory clean)
How can I get rid of the commit A? Also, will getting rid of it automatically make Git realize that it is on the master branch?