Context
In the feature branch, I updated the .gitignore to ignore some generated build files.
When I wanted to switch over to the master branch and start work on another feature, the build files showed up because the master branch's .gitignore has not been updated yet.
Question
How do I create a new branch from master and work on a new feature, without the build files showing up as unstaged changes? The branch that contains the build files cannot be merged yet.