git-simple
v0.1.0
Published
A simplified Git CLI wrapper (TypeScript)
Readme
git-simple
git-simple is a simple, lightweight, and intuitive command-line interface (CLI) that wraps common Git commands into shorter, easier-to-remember aliases. It's designed to speed up your development workflow by simplifying frequent operations.
Installation
Install git-simple globally using npm to make the g command available system-wide.
npm install -g git-simple(Note: If your package is scoped, the command would be npm install -g @username/git-simple)
Usage
All commands are invoked using the g alias.
Repository Management
| Command | Description |
| :--- | :--- |
| g init | Initialize a new Git repository (git init). |
| g clone <repo> | Clone a repository into a new directory (git clone). |
| g status | Show the working tree status (git status). |
| g log | Show a concise commit history (git log --oneline). |
Committing and Pushing
| Command | Description |
| :--- | :--- |
| g commit <message> | Stage all changes and commit them (git add . then git commit). |
| g push | Push the current branch to the remote. |
| g push -u | Push and set the upstream tracking branch (git push --set-upstream origin <branch>). |
| g pull | Fetch from and integrate with another repository or a local branch (git pull). |
Branch Management
| Command | Description |
| :--- | :--- |
| g branch | Show the current branch name. |
| g branches | List all local and remote branches (git branch --all). |
| g new <name> | Create a new branch and switch to it (git checkout -b <name>). |
| g switch <name> | Switch to an existing branch (git checkout <name>). |
| g delete-branch <name> | Delete a branch (git branch -d <name>). Use --force for a force delete. |
| g undo-branch-delete | Restore a recently deleted branch. |
| g rebase <branch> | Rebase the current branch onto <branch> with confirmation. |
Stashing
| Command | Description |
| :--- | :--- |
| g stash [message] | Stash your changes (git stash [save <message>]). |
| g stash-pop | Apply the most recent stash (git stash pop). |
Tagging and Releases
| Command | Description |
| :--- | :--- |
| g tag <name> | Create a new lightweight tag (git tag <name>). |
| g push <tag-name> | Push a specific tag to the remote (git push origin <tag-name>). |
| g push --tags | Push all local tags to the remote (git push --tags). |
History Manipulation
| Command | Description |
| :--- | :--- |
| g to <commit> | Checkout a specific commit by its hash (with confirmation). |
| g revert | Revert to the previous commit (git reset --hard HEAD~1) with confirmation. |
| g redo | Undo the last revert (git reset --hard HEAD@{1}). |
License
This project is licensed under the MIT License.
