I'm learning how to use GIT and Bitbucket. Bitbucket Admin (not me) created a remote repository.
In this repository, I have committed my changes 'A' to Master branch ( this is now root/parent/first commit in repository ).
Now, I have committed another change 'B' to Master branch. How can I rearrange the commits in remote and local repository and erase all previous history of initial commit ?
In Bitbucket, it should look like below:
Before : In Master branch
B "New Commit"
A "Initial Commit"
After: In Master branch
A "Initial Commit"
B "New Commit"
Commit 'B' was supposed to be the first/initial commit but I accidentally pushed my changes in wrong direction.
Is it possible to correct this using git commands ?