Please find below steps that I did on forked repo:
- I have created the fork of famous OSS project on Git Hub
- Done some changes, raised PR from master branch from forked repo to upstream, the PR is approved and merged with rebase/squashed commits
- Now, I want to work on another feature, unfortunately after doing
git merge upstream/master
, the master in forked repo is ahead of upstream due to merged commits
To reset fork, I am doing:
git reset --hard upstream/master
git push origin master --force
If I would have created feature branch and PR from that branch, deleting that branch would be easy.
However, since it is done from master branch, does it affect my first PR or is it safe to reset fork after submitting PR?