mirror of
https://github.com/Bhupesh-V/ugit.git
synced 2026-09-10 07:26:20 -04:00
➕ add alternate option names
This commit is contained in:
parent
2313718665
commit
f8cf84deca
34
README.md
34
README.md
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
- You did an accidental `git` command you didn't want to.
|
||||
- You don't want to waste your time searching on _how to undo ..._
|
||||
- Because ugit is cool
|
||||
|
||||
|
||||
## What's in the box
|
||||
|
|
@ -51,23 +52,28 @@
|
|||
2. GNU utils like `awk`, `grep`, `tput` etc
|
||||
3. [fzf](https://github.com/junegunn/fzf)
|
||||
|
||||
Install the script using `wget`
|
||||
1. Install the script using `wget`
|
||||
```bash
|
||||
# Linux
|
||||
wget -q https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit && chmod +x ugit && mv ugit $HOME/.local/bin/
|
||||
# Mac
|
||||
wget -q https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit && chmod +x ugit && mv ugit /usr/local/bin
|
||||
```
|
||||
|
||||
```bash
|
||||
# Linux
|
||||
wget -q https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit && chmod +x ugit && mv ugit $HOME/.local/bin/
|
||||
# Mac
|
||||
wget -q https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit && chmod +x ugit && mv ugit /usr/local/bin
|
||||
```
|
||||
or `curl`
|
||||
|
||||
or `curl`
|
||||
```bash
|
||||
# Linux
|
||||
curl -fsSL https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit -o ugit && chmod +x ugit && mv ugit $HOME/.local/bin/
|
||||
# Mac
|
||||
curl -fsSL https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit -o ugit && chmod +x ugit && mv ugit /usr/local/bin
|
||||
```
|
||||
|
||||
```bash
|
||||
# Linux
|
||||
curl -fsSL https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit -o ugit && chmod +x ugit && mv ugit $HOME/.local/bin/
|
||||
# Mac
|
||||
curl -fsSL https://github.com/Bhupesh-V/ugit/releases/latest/download/ugit -o ugit && chmod +x ugit && mv ugit /usr/local/bin
|
||||
```
|
||||
2. Verify installation
|
||||
```bash
|
||||
ugit --version
|
||||
```
|
||||
Optionally run `ugit --help` to see help and management commands
|
||||
|
||||
## Please read ⚠️
|
||||
|
||||
|
|
|
|||
18
ugit
18
ugit
|
|
@ -231,6 +231,18 @@ show_version() {
|
|||
}
|
||||
|
||||
print_help() {
|
||||
cat <<EOF
|
||||
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-u]
|
||||
|
||||
ugit helps you undo your last git command without much effort
|
||||
Just run 'ugit' and search for what you want to undo
|
||||
|
||||
Available options:
|
||||
|
||||
-h, --help Print this help and exit
|
||||
-v, --version Print current ugit version
|
||||
-u, --update Update ugit
|
||||
EOF
|
||||
printf "\n%s\n" "Contact 📬️: varshneybhupesh@gmail.com for assistance"
|
||||
printf "%s\n" "Read the guide: https://bhupesh.gitbook.io/notes/git/how-to-undo-anything-in-git"
|
||||
}
|
||||
|
|
@ -257,13 +269,13 @@ main() {
|
|||
if [[ $# -gt 0 ]]; then
|
||||
local key="$1"
|
||||
case "$key" in
|
||||
--version)
|
||||
--version|-v)
|
||||
show_version
|
||||
;;
|
||||
--update)
|
||||
--update|-u)
|
||||
ugit_update
|
||||
;;
|
||||
--help)
|
||||
--help|-h)
|
||||
print_help
|
||||
exit
|
||||
;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue