how to make emacs + egg (git) work with remote files (accessed via ssh)

I have emacs + egg working correctly when accessing repos/dirs/files that are in my local system.

Also, opening and editing files via ssh works fine, e.g.

  • git-commit vim-like syntax highlighting in emacs
  • Is there functionality in magit, the emacs git add-on, to jump to edits?
  • How do I configure git to inherit my specific $PATH environment variable?
  • Git Version Control in Emacs Code Browser
  • Emacs Based Git Diff Tool?
  • Amending commit that is edited as part of a rebase in magit
  • ctrl-f /ssh:jds@dev.acme.com:/home/jds/src/test.py
    

    but then when executing egg-status, I get…

    Opening input file: no such file or directory, /HEAD
    

    Note that if I open a shell and ssh into the remote system, all git commands work correctly.

    Thanks for any help to get this to work.

  • Can't run bundle update on Windows
  • why git-completion.bash is not autocompleting show-ref?
  • Can I version control my .bash_profile?
  • Android source code and repo - What exactly is happening when getting code
  • Can one add a comment to a pull request by email in Github?
  • Automatically tag with git and gradle during Android assemble
  • 2 Solutions collect form web for “how to make emacs + egg (git) work with remote files (accessed via ssh)”

    I agree with Alex’s answer that you should use the more advanced and awesome magit package.

    The longer story about why egg doesn’t work the way you want is this: The way egg is written it cannot operate on remote files with TRAMP because egg.el uses the call-process function, whereas magit uses start-file-process which is supported as described in the Remote Processes section of the TRAMP manual:

    5.4 Integration with other Emacs packages.
    
    tramp supports running processes on a remote host. This allows to
    exploit Emacs packages without modification for remote file names.
    [...]
    process-file and start-file-process work on the remote host when the
    variable default-directory is remote:
    
         (let ((default-directory "/ssh:remote.host:"))
           (start-file-process "grep" (get-buffer-create "*grep*")
                               "/bin/sh" "-c" "grep -e tramp *"))
    

    The magit package works fine with remote files (just re-checked :-). And I think, that it most advanced between all Emacs/Git packages.

    Git Baby is a git and github fan, let's start git clone.