The strangest things happen. Once I was a GNU/Linux user who spent most of the time staring at a framebuffer console and used vim exclusively. Today I use Mac OS X and Aquamacs most of the time (although I still use vim for many tasks) because editing LaTeX and Coq (with the fantastic ProofGeneral mode) is so much nicer using Emacs. Like every serious Emacs user I hate to leave the editor for tasks like file management or revision control. With egg managing projects under git revision control is a breeze. This blog post by the author of egg has a partial introduction so I’ll just summarize my daily usage of egg.
When I have just edited a single file, I’ll hit
C-x v i and the enter key. This stages the current buffer’s modifications. To commit the staged changes, use
C-x v w, review the staged changes and edit the commit messages in the buffer that pops up, and finish off with
If I have edited multiple files and I don’t want to commit all files in one go, I conjure up the status of the git repository using the incantation
C-x v s. This will show basically what
git-status would show you. The display is usually very crowded because for each modification to a file tracked by git it shows a diff. To hide this, navigate to the section you want to unclutter, e.g. Unstaged Changes:, and hit
H. Now, to stange or unstage a file, position the cursor on its name, and hit
s. To ge to the commit screen, just use
c. That’s all I normally do with egg.