Without this change, after building bitcoin master and testing it, I see the following untracked files:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
qa/
src/test/buildenv.py
src/wallet.backup
I've tried to keep the .gitignore lines in the appropriate sections of the file.