A command-line tool that provides a simple, interactive interface for common Git operations.
git-i is designed to streamline your daily Git workflow. Instead of remembering various Git commands and flags, you can use this tool to perform actions like adding, committing, and pushing changes through an easy-to-use interactive menu.
It's perfect for both beginners who are learning Git and experienced developers who want to speed up their workflow.
To install git-i globally on your system, run the following command:
npm install -g @joeperpetua/git-iYou can use git-i in two main ways:
Run the tool without any arguments to launch the main menu. This menu lists all available actions.
git-iYou will see a prompt like this:
? What would you like to do? › - Use arrow-keys. Return to submit.
❯ Add files
Restore changes
Delete branches
Commit changes
Amend previous commit
Push to remote
Force push to remote
Exit
Navigate with arrow keys and press Enter to select an option.
You can also execute a specific command directly from your terminal.
git-i <command> [options]Interactively select files to stage for the next commit. It displays a list of all new, modified, or deleted files in your working directory.
Usage:
git-i addThis will show a checklist of files. Use the <space> bar to select/deselect files and <enter> to stage them.
Interactively unstage files or discard changes in your working directory.
Usage:
git-i restoreThis command presents a list of both staged and unstaged changes.
- Selecting staged changes will unstage them (equivalent to
git restore --staged <file>). - Selecting unstaged changes will discard them from your working directory (equivalent to
git restore <file>).
Interactively select and delete local branches.
Usage:
git-i branch deleteIt lists all local branches except for the current branch, allowing you to select multiple branches for deletion.
Guides you through creating a commit.
Usage:
git-i commitOptions:
--amend: Use this flag to amend the previous commit instead of creating a new one. The interactive menu provides a separate option for this.
The command will prompt you for a commit message (required) and an optional commit description.
Guides you through pushing your changes to a remote repository.
Usage:
git-i pushOptions:
--force: Use this flag to perform a force push. The interactive menu provides a separate option for this.
The command will prompt you to select a remote and a branch to push to, defaulting to the current branch.
Contributions are welcome! If you have ideas for new features or find a bug, please open an issue or submit a pull request.
This project is licensed under the MIT License.