git-select-list
is a tool to interactively perform Git operations. It allows you to select files or stashes from a list for actions like git add
, git stash
, git stash apply
, and git stash drop
.
2025-01-11_20.29.54.mov
This tool is designed for users who find Git's interactive mode insufficient but do not need advanced features.
If you require more powerful features, we recommend using tools like tig. Alternatively, you can utilize Git's standard -i
option for entering interactive mode.
git-select-list
is a lightweight solution for those looking for a balance between simplicity and usability.
- Interactive UI: Navigate with arrow keys, select with
a
ors
, and toggle all withu
. - Multiple Actions: Supports
git add
,git stash
,git stash apply
, andgit stash drop
. - Lightweight Setup: No external dependencies, with an included setup script.
-
Clone this repository:
git clone https://github.com/pppp606/git-select-list.git cd git-select-list
-
Run the setup script:
bash setup.sh
-
After setup, you can use the
git ls
command.
git ls <action> [subaction]
- Run the following command:
git ls add
- Select files from the displayed list using
a
oru
, then pressEnter
. - The selected files will be staged.
- Run the following command:
git ls stash
- Select files from the displayed list using
a
oru
, then pressEnter
. - The selected files will be stashed.
- Run the following command:
git ls stash apply
- Select a stash from the displayed list and press
Enter
.
- Run the following command:
git ls stash drop
- Select a stash from the displayed list and press
Enter
.
Command | Description |
---|---|
git ls add |
Interactively select modified files to stage. |
git ls stash |
Interactively select modified files to stash. |
git ls stash apply |
Interactively select stashes to apply. |
git ls stash drop |
Interactively select stashes to drop. |
- Arrow Keys: Navigate between items.
a
ors
Key: Select or deselect the current item.u
Key: Select or deselect all items.Enter
orSpace
Key: Confirm the selection.
-
git ls
is not recognized:- Ensure you ran
setup.sh
to configure the alias. - Check if the alias is set:
git config --global --get alias.ls
- Ensure you ran
-
Script doesn't work:
- Ensure the required files are present.
- Confirm the path to the script is correct in
setup.sh
.
-
Remove the alias:
git config --global --unset alias.ls
-
Delete the repository:
rm -rf git-select-list
This project is licensed under the MIT License.
Enjoy a faster and more interactive Git workflow with git-select-list
! 🎉