Using the feature Edit-file influences more than the edited parts

Hi all -First post.
I have an issue when i use the Edit file feature in my own repo.
When compare …compares my code-change against project-Master, parts i never touched are being marked up as changed.
This is what i an trying to do:
I have seven reals that i want to change in a existing block of code
I also want to add some explanation to the block as comment, because i feel it is missing.
From my editor (NotePad++):

  • i copy the block in question
  • Open my gitHup repo
  • Browse to the file
  • Open the file for editing with
  • Find the codeblock and replace it with my edited clip-board version.
  • Use the Commit button on the page
    I now expect my tiny edit to have replaced the previous code.
    I then create a Pull-request up against project-Master, and ask for Project-review:
    The Reviewer then tells me that i have made changes to code in several different files!! and in more than 900 lines of code!
    That is just wrong!
    What is wrong in my approach?
    Why does editing a file in my own repo, with the gitHub tools, resulting in this kind of problem?
    It has happened 4 times now.
    Every time it is different code that are being marked as changed.

Can anyone explain ?

Hey @musikBear :wave:

Thanks so much for your post; that sounds very frustrating! Though from what you describe, I wouldn’t be able to narrow down behavior with that description alone.

Is this work being done in a public repo? If so, it would be helpful if you could link to an example PR showing this behavior.

Outside of examining your specific PR(s), I’d be wondering if you’re working on a particular branch? Is it possible you’re working a branch that someone else is also committing code changes to/on? That could certainly explain things.

If you are working directly on the main branch, have you considered working on a unique branch to yourself as you make changes? This should ideally keep any guessing out of what the pull request includes, once you get that far.