3

Sometimes I get to review a bunch of files that have been moved and modified. In GitHub I cannot find a way to see what has been modified. Everything looks like a new file. It makes review harder because I am probably reviewing something that has already been reviewed.

What is a proper way to handle such changes on requestor side?

One idea that comes to my mind is to split changes into two pull requests:

  1. One with moving files.
  2. Another with modifying the files.

Or perhaps there is also something that can be done on reviewers side? Some tool to help?

  • 3
    I don't really have much experience with GitHub's PR interface, however at least Bitbucket correctly displays moved files as moved. Either way, one of the options would be to introduce an internal guideline to create a separate commit for moving a file, rather than a separate PR. – Andy Jul 14 at 8:32
5

It's something that I would strongly recommend - if you plan to move files around, create one pull request just to move the files, and obviously make all the necessary changes to keep your project working (make files etc. that need to be modified). Reviewing changes in moved files is an absolute pain, and there is no reason why you should need to suffer with that.

A separate commit may be enough, but depending on your working style, I'd prefer the separate pull request.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.