Shortcuts Reference
🟢 Stable
nanx provides intuitive shortcuts for common git operations. All shortcuts are available
through the nanx r command (or nanx repo).
View All Shortcuts
To see all available shortcuts in your terminal:
nanx --aliases
# or
nanx --shortcuts
Basic Git Operations
| Shortcut | Command | Description |
nanx r s | git status | Show working tree status |
nanx r a <file> | git add <file> | Add file to staging |
nanx r aa | git add --all | Add all changes |
nanx r cm "msg" | git commit -m "msg" | Commit with message |
nanx r pu | git push | Push to remote |
nanx r pl | git pull | Pull from remote |
nanx r f | git fetch | Fetch from remote |
Branch Operations
| Shortcut | Command | Description |
nanx r b | git branch | List branches |
nanx r co <branch> | git checkout <branch> | Switch to branch |
nanx r cob <name> | git checkout -b <name> | Create and switch to new branch |
nanx r m <branch> | git merge <branch> | Merge branch |
nanx r rb <branch> | git rebase <branch> | Rebase onto branch |
nanx r switch -c <name> | git switch -c (or worktree) | Create and switch to branch |
nanx r switch --copy-from <branch> | worktree + copy files | Create worktree, copy .env from branch |
nanx r switch -e | worktree + open editor | Create worktree, open in editor |
Viewing Changes
| Shortcut | Command | Description |
nanx r d | git diff | Show unstaged changes |
nanx r ds | git diff --staged | Show staged changes |
nanx r l | git log --oneline | Show commit log (compact) |
nanx r lg | git log --graph --oneline | Show commit graph |
Composite Workflows
These shortcuts chain multiple operations together:
| Shortcut | Operations | Description |
nanx r acm "msg" | add --all + commit | Add all and commit |
nanx r cgm "msg" | commit + push | Commit and push |
nanx r acgm "msg" | add --all + commit + push | Add all, commit, and push |
nanx r puu | push -u origin HEAD | Push and set upstream |
nanx r plr | pull --rebase | Pull with rebase |
nanx r unstage | reset HEAD | Unstage all changes |
Other Useful Commands
| Shortcut | Command | Description |
nanx r st <msg> | git stash -m "msg" | Stash changes with message |
nanx r stp | git stash pop | Pop stashed changes |
nanx r stl | git stash list | List stashes |
nanx r rs <file> | git restore <file> | Restore file |
nanx r cl <url> | git clone <url> | Clone repository |