Switch to your new branch by using command :
git checkout x
and then command to add build file to .gitignore to untrack them from git which are currently tracked by it.
echo "build/" >> .gitignore
git rm -r --cached build/
but add actual file path at build/ which you want to untrack from git.