Somewhere in this process a file is being modified:

git reset --hard

touch server/routes/api/v1/handlers/foo.spec.js

git status

Result from last command:

Changes not staged for commit:
    modified:   server/lib/bar.js
    modified:   server/lib/bar.spec.js

What? How did that file get modified? That's not the file I modified. Well I though maybe my IDE had it open, but no. Not open in Chrome or a different text editor. So I check lsof:

lsof +d '/Users/jcol53'|grep aaa

No results. Worth noting that the files being modified are in my home directory, in a subfolder. So I get more aggressive:

while true; do lsof +d '/Users/jcol53'|grep aaa; done;

And in a different window do the same things: reset, touch, status. Somehow the files are modified again! But lsof still has no output!

So, how do I track down who modified this file? Is there some trick to lsof on a Mac?

You must log in to answer this question.

Browse other questions tagged .