You can use a cross platform file system event notification package like 
fsnotify/fsnotify or rjeczalik/notify, both on github. Instead of HEAD, may be 
just watch .git/index and when it changes, do git ls-files and see what 
changed. This will also catch local git add etc. though this probably doesn't 

> On Feb 16, 2017, at 5:05 AM, Paul Lalonde <> wrote:
> I'll give Watch and a bit of scripting a shot.  I couldn't find a git "HEAD 
> changed" hook to tie to, so Watch is pretty much the right thing.
> Thanks!
>> On Wed, Feb 15, 2017 at 9:04 PM Erik Quanstrom <> wrote:
>> try writing the file?  😀
>> On Feb 15, 2017 5:05 AM, Paul Lalonde <> wrote:
>> I know I'm not the only acme user who uses Git extensively :-)
>> Is there some way to tell if a file is changed on disk that is open in an 
>> editor window?  I frequently change branches and I often find myself editing 
>> stale versions.  I notice when comes time to Put, but that's a bit late.
>> Any tips to share? 
>> Paul

Reply via email to