How can I tell git to ignore the current modification made to a file
foobar, but not any future modifications?
If you place the "ignore" concept on a higher level than the low level store in index and repository level, then you get much higher flexibility and and you only have to adapt your work flow/process a little.
Let's say that I am working on my awesome new hello world program, but I need to add some debug while developing and this is not something I want to become part of the final delivery. What I do in such cases is to just check in that change as a normal commit but mark it in a special way, by prefix and postfixing the commit message with a string that clearly stands out from the other commit messages.

When I some time later want to finish the work I just filter out all those temporarily commits.
$ git checkout -b deliver work
Switched to a new branch 'deliver'
$ git rebase -i master
and then with the special marking of the commit messages it trivial to see what commits to remove:
pick fdbd12a Mininmal main.c
pick 21e3d6f hello world with arg support
pick a62ebac ========= DEBUG: print argc ========
pick 3160605 Use EXIT_SUCCESS
pick 0ec0ac6 constify message
# Rebase 8ce6878..0ec0ac6 onto 8ce6878
...
Which then gives me a clean delivery branch:

which I can merge into whatever branch I want to deliver to.
In your case you could for instance check in the change with new configuration keys as
git add yourfile
git commit -m "======== NEW CONFIG KEYS ========"
and then just filter out that commit when delivering, or possibly have a separate branch to work on where this commit is the only difference. E.g.
git checkout -b computer_new computer_old
git add yourfile
git commit -m "======== NEW CONFIG KEYS ========"
# do some work
git commit -am "some work 1"
git commit -am "some work 2"
git commit -am "some work 3"
# Rebase to put "NEW CONFIG KEYS" as the newest commit
git rebase -i computer_old
Change from
pick xxxxx ======== NEW CONFIG KEYS ========
pick xxxxx some work 1
pick xxxxx some work 2
pick xxxxx some work 3
to
pick xxxxx some work 1
pick xxxxx some work 2
pick xxxxx some work 3
pick xxxxx ======== NEW CONFIG KEYS ========
and then merge those new work commits back to computer_old
git checkout computer_old
git merge computer_new^
(branch^ means one commit older than newest commit on branch, e.g. merge up til including "the some work 3" commit).