Integrate Git directly into the Nemo file explorer using context menus.
This project brings Git functionality into Nemo, the file manager used in the Cinnamon (a GNOME Files fork, formerly Nautilus) desktop environment.
It lets you perform common Git operations via right-click, without opening a terminal or IDE.
Ensure you're running Debian with Cinnamon as your window manager and Nemo as your file explorer.
make install # Copies *.nemo_action files to the ~/.local/share/nemo/actions folder
make uninstall # Removes installed actions
-
use debian as your operating system. probably works with red hat but it is not tested.
-
use cinnnamon as you windows manager
-
use nemo as your file explorer.
-
copy all *.nemo_action files to your ~/.local/share/nemo/actions or
make install
as mentioned above. -
Zenity is used for graphical dialogs. if you don't have it then you can install it with apt
sudo apt install zenity
Each action is accessed by right-clicking files or folders in Nemo.
.
├── icons/ # PNG icons and README for visual enhancements
├── nemo/ # Contains .nemo_action files for context menu integration
│ └── actions/ # Each file corresponds to a specific Git operation
├── nemo-git-integration/ # Backing scripts grouped by CRUD-like categories
│ ├── s01-create/ # Scripts for repo creation (init, clone, branch)
│ ├── s02-read/ # Scripts for reading repo state (status, log, fetch)
│ ├── s03-update/ # Scripts for updating (pull, add, commit, push)
│ └── s04-delete/ # Scripts for undoing changes (reset, uninit, etc.)
├── tests/ # Bats-compatible test scripts for integration logic
├── makefile # Install/uninstall .nemo_action files
├── LICENSE # Licensing information
└── README.md # This documentation
- Git Init: Initialize a folder as a Git repository.
- Git Clone: Clone a remote Git repository.
- Git Branch: Create and switch to a new branch.
- Git Status: Show the working tree state.
- Git Log: View recent commits.
- Git Fetch: Sync from remote without merging.
- Git Pull: Merge remote changes into local branch.
- Git Add: Stage selected files.
- Git Commit: Commit staged changes.
- Git Push: Push changes to remote.
- Git Reset: Undo changes in working directory.
- Git Uninit: Remove .git directory.
- Git Unclone: Delete cloned repo.
- Git Unbranch: Delete local branch.
- Git Unpull/Unadd/Uncommit/Unpush: Roll back operations.
Contributions are welcome! If you want to contribute to this project, follow these steps:
- Open an Issue so that it can be discussed in the open.
- Fork this repository.
- Create a new branch for your feature
- Make your changes
- commit them
- Push them
- Submit a pull request from your remote into my remote
Scripts under tests/
use Bats for shell testing. Each test corresponds to a script under nemo-git-integration/
.
make dev # installs bats
make test # bats tests/*
Some useful nemo_action stuff to help understand the code
%P: This placeholder represents the full path to the directory containing the selected file or folder. This ensures that the command navigates to the correct directory before executing the Git command.
%F: This represents the full path to the selected file.
%N: This represents the filename without the path, useful for commit messages.
s: Action is available when only one item is selected.
m: Action is available when multiple items are selected.
a: Action is available when one or more items are selected.
f: Action is available when files are selected.
d: Action is available when directories are selected.
You can combine these values to create more specific conditions. For example:
af: Action is available when one or more files are selected.
ad: Action is available when one or more directories are selected.
adf: Action is available when one or more directories or files are selected.
"$1" is the path to the current directory (%P in .nemo_action).
"$@" handles the selected files (%F in .nemo_action).
Uses zenity --question to confirm reset, which is destructive.
Aggregates errors to show at the end if anything failed.
see nemo --help for more details
NEMO_DEBUG=Actions,Window nemo --debug