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.

Thank you for your reply!
First off : All this is caused by me, trying to only use features and methods that exists on your Homepage! In other words, i do not use git-cmds from CLI!
The reason is that i have made to many new features, and that our reviewers prefer to review one feature at a time. I would have to delete functional code in order to use git-cmds on CLI. :sob:
So i hoped i could manage these commits as single PRs by only using your Homepage as ‘tool’.
I have narrowed the issue down to a need for being able to synchronise my own fork of Master, before i add code in a file, in my branch.
My own fork of Master should be identical with project-master!
If my own fork is identical to master, then my branch should only contain the few lines of new code i manually add to the branch -Right(?)
At least, that is my ‘plan’…
But i just cant find any Homepage-method that will make my Fork
100% identical to the project Master:

Is there such a method?