So the master branch of my upstream repo is in bit of a mess.
Commits on upstream branch looks like below.
A - Latest commit
|
B
|
C - Bad commit
|
D - Commit I want the upstream master branch to be at.
on my forked branch I can do a git reset --hard D
. But how can I apply these changes back to the upstream master branch. While creating a PR(Pull Request) from forked branch to upstream branch there are no changes shown.
NOTE: Direct commits on upstream branch is prohibited, it has to be done using a Pull Request from the Fork.
EDIT This is how i have cloned the remote repository.
git clone http://myrepo.git
git remote add upstream http://main-repo.git
Now origin and upstream are like below.
origin - http://myrepo.git
upstream - http://main-repo.git
Forked repository is basically a mirror clone of the remote repository. On the bit bucket UI there is an option to create a fork and enable fork syncing between origin & upstream.
When I say forked branch it means that the branch which is on the forked repository.