Skip to content

Instantly share code, notes, and snippets.

@hello-josh
hello-josh / remove-whitespace.md
Last active April 23, 2024 20:37
How to remove whitespace changes from a branch for a PR

How to remove whitespace-only changes from a PR

  1. Create a new local branch that will contain your changes without the whitespace

    git checkout -b tmp-branch

  2. Merge the changes that contain whitespace into your current branch WITHOUT committing the changes

    git merge --no-commit