Git commit on merge and deleted branch

Viewed 45

I have a very weird situation.

I have created my branch from develop branch. I wanted to delete 1 file named SendEmail.xml and after approval it got merged into the develop branch.

It didn't do anything after that like deleting my branch from locally or anything.

After a day I remember there are few references in other files(named A.xml and B.xml as well. So I just deleted the reference of SendEmail.xml from both the files and commit my changes to remote branch and created a Pull Request again.

Now when I created the Pull Request again, it is showing all the files. 2 as modified changes and SendEmail.xml as deleted even though the file is not available in develop branch.

What I tried

I tried several ways to resolve this.

  1. I tried rebasing my branch to develop and push the changes again. But it still showing all 3 files.
  2. I tried pulling data again but same result.
1 Answers

It is better to create a new branch from origin/develop, and make sure SendEmail.xml is not there.

Then, in that new local branch, you can:

  • delete the other files
  • commit and push the new branch
  • make a new PR from said new branch
Related