git(3)git - MicroEmacs GIT interface
git-setup - MicroEmacs GIT interface setup
git-add - MicroEmacs GIT interface - add items to the index
git-blame - MicroEmacs GIT interface - annotate a file
git-checkout - MicroEmacs GIT interface - switch branches or restore files
git-commit - MicroEmacs GIT interface - commit changes to repository
git-diff - MicroEmacs GIT interface - diff changes
git-ignore - MicroEmacs GIT interface - download from another repository
git-log - MicroEmacs GIT interface - list log of changes
git-move - MicroEmacs GIT interface - move an item
git-pull - MicroEmacs GIT interface - download and integrate another repository
git-push - MicroEmacs GIT interface - update remote repository
git-remove - MicroEmacs GIT interface - remove items
git-show - MicroEmacs GIT interface - show information about a specific commit
git-show-file - MicroEmacs GIT interface - output specific commit of a file
git-status - MicroEmacs GIT interface - status of items
n git
git-setup
git-add
git-blame
git-checkout
git-commit
git-diff
git-fetch
git-log
git-move
git-pull
git-push
git-remove
git-show
git-show-file
git-status
The git and sub-commands provide MicroEmacs with an interface to the GIT(1) version control system, see the documentation provided with GIT for more information on its features and use.
The MicroEmacs git command opens up a modified file-browser(3) with an additional "*git-console*" window. The "*files*" window includes additional flags within the Attributes column showing the GIT state. The browser by default opens with 3 windows including a representation of the file tree. When git is provided with a numeric argument n of zero (0) then a single window displaying the directory is used only (i.e. 0 git)
The functionality of the file-browser is the same as a non-GIT folder with the exception that additional GIT item controls are located in the mouse context menu (opened by clicking the right mouse button in the *files* buffer). This menu item opens another sub-menu providing access to the items below. When selecting commands than a pop-up check-box may be displayed which allows options to be selected for the command.
Current State
Checkout files
Commit files
Diff files
Item Log
Item Blame
Move items
Add items
Remove items
Clear Git console
GIT Setup
The git-add command adds the current buffer or selected items to the index (also known as the staging area). Note that a GIT commit is required to make the addition permanent.
The git-blame command opens a *git-blame* window annotating the commit and author of each line in the current buffer or single selected file.
The git-checkout command switches branches or restores working tree files.
The git-commit command commits any changes made to the index (staging area) back to the repository, local changes that have not been added to the index are ignored. The user is prompted for a commit log message. While the git commit command can commit changes to local files at the same time, this feature is not supported as it has been deemed confusing and dangerous as it will always commit ALL index changes back, not just selected ones. As a result all modified and new files must first be added to the index using git-add.
The git-diff command opens a *git-diff* window displaying the differences between the current buffer or selected local files and the repository version.
The git-fetch command downloads branches and changes from the external repository, the command does not change the current index or local files.
The git-log command opens a *git-log* window displaying the GIT commit log history of the current buffer or a combined log of the selected files.
The git-move command moves (i.e. same as rename when the destination directory is the same) the current buffer's file or selected items, any required changes to the buffer should be saved first and the new file loaded once moved. Note that unlike copy, GIT does not support a direct local to reposition move. The advantage of using move over simply deleting and adding a new item is that the item's change log history will be maintained.
The git-pull command performs a git-fetch first followed by a forward only integration. The command can optionally perform a git stash first and, if the integration is successful it can optionally perform a git stash pop. The integration can fail when there are any changes to the local repository (i.e. commits), index changes (i.e. local modifications that have been added but not committed) or to local files. If there have been local commits then these changes will need to be merged, git-pull's use of forward only will successfully integrate trivial merges, but more complicated merges will need to be done manually using git merge or rebase and is beyond the scope of this documentation. To merging changes any index changes will need to be committed first, local changes can be committed or handled by use of the Stash options. Note that if the pull requires a manual merge, any local changes that have been stashed will need to be manually popped once the merge has been completed.
The git-push command updates the remote repository with all changes made to the local repository. This command can fail if the local repository is out of date, i.e. other commits have been made or pushed to the remote repository since the last fetch. When this happens the git-fetch command should be called and changes integrated, see notes on git-pull above.
The git-remove command removes the file of the current buffer or selected files and flags them for removal in the index (staging area), the files will be permanently removed from the repository when the change is committed back. PLEASE NOTE THIS CAN LEAD TO LOST DATA!!! As the local file will be removed the file-browser will no longer list the file, use the git-status command to list change as this list includes all items flagged for removal.
The git-show command opens a *git-show* windows displaying information about a specified GIT commit.
The git-show-file command opens a *<file-name>:<commit> window with the contents set to the specified commit of a selected file.
The git-status command opens a *git-state* window and shows the state of all the items within the current directory, including the modification state, and optionally whether items are out-of-date (i.e. have been modified in the repository).
git-setup provides a dialog interface to configure the MicroEmacs GIT interface if required. On a typical system installation then it is sufficient to have the git program in the $PATH and the GIT tools will operate from a working copy of a repository.
git-setup may also be accessed from user-setup(3) from the Miscellaneous configuration. The the dialog provides the following configuration tabs and options:
General
GIT Command
Global opts
Default Rep
Default Branch
DEnable Support on Start-Up
Tools
git and sub-commands are macros defined in file git.emf.
(c) Copyright JASSPA 2025
Last Modified: 2025/11/29
Generated On: 2025/12/01