This commit is contained in:
Jayakrishnan C N 2025-09-28 14:51:17 +05:30 committed by GitHub
commit 4df5ff7030
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,217 +10,217 @@ plugins=(... git)
## Aliases
| Alias | Command |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------ |
| `grt` | `cd "$(git rev-parse --show-toplevel \|\| echo .)"` |
| `ggpnp` | `ggl && ggp` |
| `ggpur` | `ggu` |
| `g` | `git` |
| `ga` | `git add` |
| `gaa` | `git add --all` |
| `gapa` | `git add --patch` |
| `gau` | `git add --update` |
| `gav` | `git add --verbose` |
| `gwip` | `git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"` |
| `gam` | `git am` |
| `gama` | `git am --abort` |
| `gamc` | `git am --continue` |
| `gamscp` | `git am --show-current-patch` |
| `gams` | `git am --skip` |
| `gap` | `git apply` |
| `gapt` | `git apply --3way` |
| `gbs` | `git bisect` |
| `gbsb` | `git bisect bad` |
| `gbsg` | `git bisect good` |
| `gbsn` | `git bisect new` |
| `gbso` | `git bisect old` |
| `gbsr` | `git bisect reset` |
| `gbss` | `git bisect start` |
| `gbl` | `git blame -w` |
| `gb` | `git branch` |
| `gba` | `git branch --all` |
| `gbd` | `git branch --delete` |
| `gbD` | `git branch --delete --force` |
| `gbgd` | `LANG=C git branch --no-color -vv \| grep ": gone\]" \| cut -c 3- \| awk '"'"'{print $1}'"'"' \| xargs git branch -d` |
| `gbgD` | `LANG=C git branch --no-color -vv \| grep ": gone\]" \| cut -c 3- \| awk '"'"'{print $1}'"'"' \| xargs git branch -D` |
| `gbm` | `git branch --move` |
| `gbnm` | `git branch --no-merged` |
| `gbr` | `git branch --remote` |
| `ggsup` | `git branch --set-upstream-to=origin/$(git_current_branch)` |
| `gbg` | `LANG=C git branch -vv \| grep ": gone\]"` |
| `gco` | `git checkout` |
| `gcor` | `git checkout --recurse-submodules` |
| `gcb` | `git checkout -b` |
| `gcB` | `git checkout -B` |
| `gcd` | `git checkout $(git_develop_branch)` |
| `gcm` | `git checkout $(git_main_branch)` |
| `gcp` | `git cherry-pick` |
| `gcpa` | `git cherry-pick --abort` |
| `gcpc` | `git cherry-pick --continue` |
| `gclean` | `git clean --interactive -d` |
| `gcl` | `git clone --recurse-submodules` |
| `gclf` | `git clone --recursive --shallow-submodules --filter=blob:none --also-filter-submodules` |
| `gccd` | `git clone --recurse-submodules "$@" && cd "$(basename $\_ .git)"` |
| `gcam` | `git commit --all --message` |
| `gcas` | `git commit --all --signoff` |
| `gcasm` | `git commit --all --signoff --message` |
| `gcmsg` | `git commit --message` |
| `gcsm` | `git commit --signoff --message` |
| `gc` | `git commit --verbose` |
| `gca` | `git commit --verbose --all` |
| `gca!` | `git commit --verbose --all --amend` |
| `gcan!` | `git commit --verbose --all --no-edit --amend` |
| `gcans!` | `git commit --verbose --all --signoff --no-edit --amend` |
| `gcann!` | `git commit --verbose --all --date=now --no-edit --amend` |
| `gc!` | `git commit --verbose --amend` |
| `gcn` | `git commit --verbose --no-edit` |
| `gcn!` | `git commit --verbose --no-edit --amend` |
| `gcs` | `git commit -S` |
| `gcss` | `git commit -S -s` |
| `gcssm` | `git commit -S -s -m` |
| `gcf` | `git config --list` |
| `gcfu` | `git commit --fixup` |
| `gdct` | `git describe --tags $(git rev-list --tags --max-count=1)` |
| `gd` | `git diff` |
| `gdca` | `git diff --cached` |
| `gdcw` | `git diff --cached --word-diff` |
| `gds` | `git diff --staged` |
| `gdw` | `git diff --word-diff` |
| `gdv` | `git diff -w "$@" \| view -` |
| `gdup` | `git diff @{upstream}` |
| `gdnolock` | `git diff $@ ":(exclude)package-lock.json" ":(exclude)\*.lock"` |
| `gdt` | `git diff-tree --no-commit-id --name-only -r` |
| `gf` | `git fetch` |
| `gfa` | `git fetch --all --tags --prune` |
| `gfo` | `git fetch origin` |
| `gg` | `git gui citool` |
| `gga` | `git gui citool --amend` |
| `ghh` | `git help` |
| `glgg` | `git log --graph` |
| `glgga` | `git log --graph --decorate --all` |
| `glgm` | `git log --graph --max-count=10` |
| `glod` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'` |
| `glods` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short` |
| `glol` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'` |
| `glola` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all` |
| `glols` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat` |
| `glo` | `git log --oneline --decorate` |
| `glog` | `git log --oneline --decorate --graph` |
| `gloga` | `git log --oneline --decorate --graph --all` |
| `glp` | `git log --pretty=<format>` |
| `glg` | `git log --stat` |
| `glgp` | `git log --stat --patch` |
| `gignored` | `git ls-files -v \| grep "^[[:lower:]]"` |
| `gfg` | `git ls-files \| grep` |
| `gm` | `git merge` |
| `gma` | `git merge --abort` |
| `gmc` | `git merge --continue` |
| `gms` | `git merge --squash` |
| `gmff` | `git merge --ff-only` |
| `gmom` | `git merge origin/$(git_main_branch)` |
| `gmum` | `git merge upstream/$(git_main_branch)` |
| `gmtl` | `git mergetool --no-prompt` |
| `gmtlvim` | `git mergetool --no-prompt --tool=vimdiff` |
| `gl` | `git pull` |
| `gpr` | `git pull --rebase` |
| `gprv` | `git pull --rebase -v` |
| `gpra` | `git pull --rebase --autostash` |
| `gprav` | `git pull --rebase --autostash -v` |
| `gprom` | `git pull --rebase origin $(git_main_branch)` |
| `gpromi` | `git pull --rebase=interactive origin $(git_main_branch)` |
| `gprum` | `git pull --rebase upstream $(git_main_branch)` |
| `gprumi` | `git pull --rebase=interactive upstream $(git_main_branch)` |
| `ggpull` | `git pull origin "$(git_current_branch)"` |
| `ggl` | `git pull origin $(current_branch)` |
| `gluc` | `git pull upstream $(git_current_branch)` |
| `glum` | `git pull upstream $(git_main_branch)` |
| `gp` | `git push` |
| `gpd` | `git push --dry-run` |
| `gpf!` | `git push --force` |
| `ggf` | `git push --force origin $(current_branch)` |
| `gpf` | On Git >= 2.30: `git push --force-with-lease --force-if-includes` |
| `gpf` | On Git < 2.30: `git push --force-with-lease` |
| `ggfl` | `git push --force-with-lease origin $(current_branch)` |
| `gpsup` | `git push --set-upstream origin $(git_current_branch)` |
| `gpsupf` | On Git >= 2.30: `git push --set-upstream origin $(git_current_branch) --force-with-lease --force-if-includes` |
| `gpsupf` | On Git < 2.30: `git push --set-upstream origin $(git_current_branch) --force-with-lease` |
| `gpv` | `git push --verbose` |
| `gpoat` | `git push origin --all && git push origin --tags` |
| `gpod` | `git push origin --delete` |
| `ggpush` | `git push origin "$(git_current_branch)"` |
| `ggp` | `git push origin $(current_branch)` |
| `gpu` | `git push upstream` |
| `grb` | `git rebase` |
| `grba` | `git rebase --abort` |
| `grbc` | `git rebase --continue` |
| `grbi` | `git rebase --interactive` |
| `grbo` | `git rebase --onto` |
| `grbs` | `git rebase --skip` |
| `grbd` | `git rebase $(git_develop_branch)` |
| `grbm` | `git rebase $(git_main_branch)` |
| `grbom` | `git rebase origin/$(git_main_branch)` |
| `grbum` | `git rebase upstream/$(git_main_branch)` |
| `grf` | `git reflog` |
| `gr` | `git remote` |
| `grv` | `git remote --verbose` |
| `gra` | `git remote add` |
| `grrm` | `git remote remove` |
| `grmv` | `git remote rename` |
| `grset` | `git remote set-url` |
| `grup` | `git remote update` |
| `grh` | `git reset` |
| `gru` | `git reset --` |
| `grhh` | `git reset --hard` |
| `grhk` | `git reset --keep` |
| `grhs` | `git reset --soft` |
| `gpristine` | `git reset --hard && git clean --force -dfx` |
| `gwipe` | `git reset --hard && git clean --force -df` |
| `groh` | `git reset origin/$(git_current_branch) --hard` |
| `grs` | `git restore` |
| `grss` | `git restore --source` |
| `grst` | `git restore --staged` |
| `gunwip` | `git rev-list --max-count=1 --format="%s" HEAD \| grep -q "--wip--" && git reset HEAD~1` |
| `grev` | `git revert` |
| `grm` | `git rm` |
| `grmc` | `git rm --cached` |
| `gcount` | `git shortlog --summary -n` |
| `gsh` | `git show` |
| `gsps` | `git show --pretty=short --show-signature` |
| `gstall` | `git stash --all` |
| `gstu` | `git stash --include-untracked` |
| `gstaa` | `git stash apply` |
| `gstc` | `git stash clear` |
| `gstd` | `git stash drop` |
| `gstl` | `git stash list` |
| `gstp` | `git stash pop` |
| `gsta` | On Git >= 2.13: `git stash push` |
| `gsta` | On Git < 2.13: `git stash save` |
| `gsts` | `git stash show --patch` |
| `gst` | `git status` |
| `gss` | `git status --short` |
| `gsb` | `git status --short -b` |
| `gsi` | `git submodule init` |
| `gsu` | `git submodule update` |
| `gsd` | `git svn dcommit` |
| `git-svn-dcommit-push` | `git svn dcommit && git push github $(git_main_branch):svntrunk` |
| `gsr` | `git svn rebase` |
| `gsw` | `git switch` |
| `gswc` | `git switch -c` |
| `gswd` | `git switch $(git_develop_branch)` |
| `gswm` | `git switch $(git_main_branch)` |
| `gta` | `git tag --annotate` |
| `gts` | `git tag -s` |
| `gtv` | `git tag \| sort -V` |
| `gignore` | `git update-index --assume-unchanged` |
| `gunignore` | `git update-index --no-assume-unchanged` |
| `gwch` | `git whatchanged -p --abbrev-commit --pretty=medium` |
| `gwt` | `git worktree` |
| `gwtls` | `git worktree list` |
| `gwtmv` | `git worktree move` |
| `gwtrm` | `git worktree remove` |
| `gk` | `gitk --all --branches &!` |
| `gke` | `gitk --all $(git log --walk-reflogs --pretty=%h) &!` |
| `gtl` | `gtl(){ git tag --sort=-v:refname -n --list ${1}\* }; noglob gtl` |
| Alias | Command | Description |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------- |
| `grt` | `cd "$(git rev-parse --show-toplevel \|\| echo .)"` | Navigate to the root directory of the current git repository |
| `ggpnp` | `ggl && ggp` | Pull from origin and then push to origin (pull and push) |
| `ggpur` | `ggu` | Pull with rebase from upstream |
| `g` | `git` | Short alias for git command |
| `ga` | `git add` | Add files to the staging area |
| `gaa` | `git add --all` | Add all changes (including new, modified, and deleted files) to staging area |
| `gapa` | `git add --patch` | Interactively add changes to staging area by selecting hunks |
| `gau` | `git add --update` | Add only modified and deleted files to staging area (no new files) |
| `gav` | `git add --verbose` | Add files to staging area with verbose output showing what was added |
| `gwip` | `git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"` | Create a work-in-progress commit with all changes and skip CI |
| `gam` | `git am` | Apply patches from mailbox format |
| `gama` | `git am --abort` | Abort the current patch application process |
| `gamc` | `git am --continue` | Continue applying patches after resolving conflicts |
| `gamscp` | `git am --show-current-patch` | Show the current patch being applied |
| `gams` | `git am --skip` | Skip the current patch and continue with the next one |
| `gap` | `git apply` | Apply a patch to files and/or to the index |
| `gapt` | `git apply --3way` | Apply patch using 3-way merge when conflicts occur |
| `gbs` | `git bisect` | Start or manage binary search to find problematic commit |
| `gbsb` | `git bisect bad` | Mark current commit as bad during bisect |
| `gbsg` | `git bisect good` | Mark current commit as good during bisect |
| `gbsn` | `git bisect new` | Mark current commit as new (bad) during bisect |
| `gbso` | `git bisect old` | Mark current commit as old (good) during bisect |
| `gbsr` | `git bisect reset` | End bisect session and return to original branch |
| `gbss` | `git bisect start` | Start a new bisect session |
| `gbl` | `git blame -w` | Show who last modified each line of a file, ignoring whitespace changes |
| `gb` | `git branch` | List, create, or delete branches |
| `gba` | `git branch --all` | List all branches (local and remote) |
| `gbd` | `git branch --delete` | Delete a branch (safe delete, only if merged) |
| `gbD` | `git branch --delete --force` | Force delete a branch regardless of merge status |
| `gbgd` | `LANG=C git branch --no-color -vv \| grep ": gone\]" \| cut -c 3- \| awk '"'"'{print $1}'"'"' \| xargs git branch -d` | Delete local branches that track deleted remote branches (safe delete) |
| `gbgD` | `LANG=C git branch --no-color -vv \| grep ": gone\]" \| cut -c 3- \| awk '"'"'{print $1}'"'"' \| xargs git branch -D` | Force delete local branches that track deleted remote branches |
| `gbm` | `git branch --move` | Rename/move a branch |
| `gbnm` | `git branch --no-merged` | List branches that are not merged into current branch |
| `gbr` | `git branch --remote` | List remote-tracking branches |
| `ggsup` | `git branch --set-upstream-to=origin/$(git_current_branch)` | Set upstream tracking for current branch to origin |
| `gbg` | `LANG=C git branch -vv \| grep ": gone\]"` | Show local branches that track deleted remote branches |
| `gco` | `git checkout` | Switch branches or restore working tree files |
| `gcor` | `git checkout --recurse-submodules` | Checkout and recursively update submodules |
| `gcb` | `git checkout -b` | Create and switch to a new branch |
| `gcB` | `git checkout -B` | Create or reset and switch to a branch |
| `gcd` | `git checkout $(git_develop_branch)` | Switch to the development branch (dev, devel, development, or develop) |
| `gcm` | `git checkout $(git_main_branch)` | Switch to the main branch (main or master) |
| `gcp` | `git cherry-pick` | Apply commits from another branch to current branch |
| `gcpa` | `git cherry-pick --abort` | Abort cherry-pick operation |
| `gcpc` | `git cherry-pick --continue` | Continue cherry-pick after resolving conflicts |
| `gclean` | `git clean --interactive -d` | Interactively remove untracked files and directories |
| `gcl` | `git clone --recurse-submodules` | Clone a repository and recursively clone its submodules |
| `gclf` | `git clone --recursive --shallow-submodules --filter=blob:none --also-filter-submodules` | Clone repository with filtered blobs and shallow submodules for faster cloning |
| `gccd` | `git clone --recurse-submodules "$@" && cd "$(basename $\_ .git)"` | Clone repository with submodules and change to the cloned directory |
| `gcam` | `git commit --all --message` | Commit all changes with a message |
| `gcas` | `git commit --all --signoff` | Commit all changes and add signed-off-by line |
| `gcasm` | `git commit --all --signoff --message` | Commit all changes with message and signed-off-by line |
| `gcmsg` | `git commit --message` | Create a commit with a message |
| `gcsm` | `git commit --signoff --message` | Create a commit with message and signed-off-by line |
| `gc` | `git commit --verbose` | Create a commit with verbose output showing diff |
| `gca` | `git commit --verbose --all` | Commit all changes with verbose output |
| `gca!` | `git commit --verbose --all --amend` | Amend last commit with all current changes and verbose output |
| `gcan!` | `git commit --verbose --all --no-edit --amend` | Amend last commit with all changes without editing message |
| `gcans!` | `git commit --verbose --all --signoff --no-edit --amend` | Amend last commit with all changes, add sign-off, no edit |
| `gcann!` | `git commit --verbose --all --date=now --no-edit --amend` | Amend last commit with current timestamp, all changes, no edit |
| `gc!` | `git commit --verbose --amend` | Amend last commit with verbose output |
| `gcn` | `git commit --verbose --no-edit` | Create commit with verbose output but no editor |
| `gcn!` | `git commit --verbose --no-edit --amend` | Amend last commit without opening editor |
| `gcs` | `git commit -S` | Create a GPG-signed commit |
| `gcss` | `git commit -S -s` | Create a GPG-signed commit with sign-off |
| `gcssm` | `git commit -S -s -m` | Create a GPG-signed commit with sign-off and message |
| `gcf` | `git config --list` | List all git configuration settings |
| `gcfu` | `git commit --fixup` | Create a fixup commit for later use with rebase --autosquash |
| `gdct` | `git describe --tags $(git rev-list --tags --max-count=1)` | Show the most recent tag |
| `gd` | `git diff` | Show changes between working directory and staging area |
| `gdca` | `git diff --cached` | Show changes between staging area and last commit |
| `gdcw` | `git diff --cached --word-diff` | Show word-level changes between staging area and last commit |
| `gds` | `git diff --staged` | Show changes between staging area and last commit (same as gdca) |
| `gdw` | `git diff --word-diff` | Show word-level changes between working directory and staging area |
| `gdv` | `git diff -w "$@" \| view -` | Show diff ignoring whitespace and pipe to view |
| `gdup` | `git diff @{upstream}` | Show diff between current branch and its upstream |
| `gdnolock` | `git diff $@ ":(exclude)package-lock.json" ":(exclude)\*.lock"` | Show diff excluding lock files |
| `gdt` | `git diff-tree --no-commit-id --name-only -r` | Show only the names of changed files in a commit |
| `gf` | `git fetch` | Download objects and refs from remote repository |
| `gfa` | `git fetch --all --tags --prune` | Fetch from all remotes, download tags, and prune deleted branches |
| `gfo` | `git fetch origin` | Fetch from origin remote |
| `gg` | `git gui citool` | Open git GUI commit tool |
| `gga` | `git gui citool --amend` | Open git GUI commit tool to amend last commit |
| `ghh` | `git help` | Show git help documentation |
| `glgg` | `git log --graph` | Show commit history as a graph |
| `glgga` | `git log --graph --decorate --all` | Show commit history graph with decorations for all branches |
| `glgm` | `git log --graph --max-count=10` | Show last 10 commits as a graph |
| `glod` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'` | Show commit log with colored format including absolute dates |
| `glods` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short` | Show commit log with colored format and short dates |
| `glol` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'` | Show commit log with colored format including relative dates |
| `glola` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all` | Show commit log with colored format for all branches |
| `glols` | `git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat` | Show commit log with colored format and file change statistics |
| `glo` | `git log --oneline --decorate` | Show compact one-line commit history with decorations |
| `glog` | `git log --oneline --decorate --graph` | Show compact one-line commit history as a graph |
| `gloga` | `git log --oneline --decorate --graph --all` | Show compact one-line commit history graph for all branches |
| `glp` | `git log --pretty=<format>` | Show commit log with custom pretty format |
| `glg` | `git log --stat` | Show commit history with file change statistics |
| `glgp` | `git log --stat --patch` | Show commit history with statistics and full patch content |
| `gignored` | `git ls-files -v \| grep "^[[:lower:]]"` | List files that are ignored or assume-unchanged |
| `gfg` | `git ls-files \| grep` | Search for files in git repository by pattern |
| `gm` | `git merge` | Merge branches together |
| `gma` | `git merge --abort` | Abort current merge operation |
| `gmc` | `git merge --continue` | Continue merge after resolving conflicts |
| `gms` | `git merge --squash` | Merge branch and squash commits into single commit |
| `gmff` | `git merge --ff-only` | Merge only if fast-forward is possible |
| `gmom` | `git merge origin/$(git_main_branch)` | Merge origin's main branch into current branch |
| `gmum` | `git merge upstream/$(git_main_branch)` | Merge upstream's main branch into current branch |
| `gmtl` | `git mergetool --no-prompt` | Run merge tool without prompting |
| `gmtlvim` | `git mergetool --no-prompt --tool=vimdiff` | Run vimdiff as merge tool without prompting |
| `gl` | `git pull` | Pull changes from remote repository |
| `gpr` | `git pull --rebase` | Pull and rebase instead of merge |
| `gprv` | `git pull --rebase -v` | Pull and rebase with verbose output |
| `gpra` | `git pull --rebase --autostash` | Pull and rebase with automatic stashing of local changes |
| `gprav` | `git pull --rebase --autostash -v` | Pull and rebase with autostash and verbose output |
| `gprom` | `git pull --rebase origin $(git_main_branch)` | Pull and rebase from origin's main branch |
| `gpromi` | `git pull --rebase=interactive origin $(git_main_branch)` | Interactive pull and rebase from origin's main branch |
| `gprum` | `git pull --rebase upstream $(git_main_branch)` | Pull and rebase from upstream's main branch |
| `gprumi` | `git pull --rebase=interactive upstream $(git_main_branch)` | Interactive pull and rebase from upstream's main branch |
| `ggpull` | `git pull origin "$(git_current_branch)"` | Pull from origin using current branch name |
| `ggl` | `git pull origin $(current_branch)` | Pull from origin for current branch |
| `gluc` | `git pull upstream $(git_current_branch)` | Pull from upstream for current branch |
| `glum` | `git pull upstream $(git_main_branch)` | Pull from upstream's main branch |
| `gp` | `git push` | Push commits to remote repository |
| `gpd` | `git push --dry-run` | Show what would be pushed without actually pushing |
| `gpf!` | `git push --force` | Force push (dangerous - rewrites remote history) |
| `ggf` | `git push --force origin $(current_branch)` | Force push current branch to origin |
| `gpf` | On Git >= 2.30: `git push --force-with-lease --force-if-includes` | Safer force push that checks if remote was updated |
| `gpf` | On Git < 2.30: `git push --force-with-lease` | Safer force push that checks if remote was updated (older git) |
| `ggfl` | `git push --force-with-lease origin $(current_branch)` | Force push current branch with lease protection |
| `gpsup` | `git push --set-upstream origin $(git_current_branch)` | Push and set upstream tracking for current branch |
| `gpsupf` | On Git >= 2.30: `git push --set-upstream origin $(git_current_branch) --force-with-lease --force-if-includes` | Push with upstream and force-with-lease protection |
| `gpsupf` | On Git < 2.30: `git push --set-upstream origin $(git_current_branch) --force-with-lease` | Push with upstream and force-with-lease protection (older git) |
| `gpv` | `git push --verbose` | Push with verbose output |
| `gpoat` | `git push origin --all && git push origin --tags` | Push all branches and tags to origin |
| `gpod` | `git push origin --delete` | Delete a branch or tag on origin remote |
| `ggpush` | `git push origin "$(git_current_branch)"` | Push current branch to origin |
| `ggp` | `git push origin $(current_branch)` | Push current branch to origin |
| `gpu` | `git push upstream` | Push to upstream remote |
| `grb` | `git rebase` | Reapply commits on top of another base tip |
| `grba` | `git rebase --abort` | Abort current rebase operation |
| `grbc` | `git rebase --continue` | Continue rebase after resolving conflicts |
| `grbi` | `git rebase --interactive` | Start interactive rebase to edit commits |
| `grbo` | `git rebase --onto` | Rebase commits onto a specific commit |
| `grbs` | `git rebase --skip` | Skip current commit during rebase |
| `grbd` | `git rebase $(git_develop_branch)` | Rebase current branch onto development branch |
| `grbm` | `git rebase $(git_main_branch)` | Rebase current branch onto main branch |
| `grbom` | `git rebase origin/$(git_main_branch)` | Rebase current branch onto origin's main branch |
| `grbum` | `git rebase upstream/$(git_main_branch)` | Rebase current branch onto upstream's main branch |
| `grf` | `git reflog` | Show reference logs (history of branch tips) |
| `gr` | `git remote` | List remote repositories |
| `grv` | `git remote --verbose` | List remote repositories with URLs |
| `gra` | `git remote add` | Add a new remote repository |
| `grrm` | `git remote remove` | Remove a remote repository |
| `grmv` | `git remote rename` | Rename a remote repository |
| `grset` | `git remote set-url` | Change URL of a remote repository |
| `grup` | `git remote update` | Update all remote-tracking branches |
| `grh` | `git reset` | Reset current HEAD to specified state |
| `gru` | `git reset --` | Unstage files (reset from staging area) |
| `grhh` | `git reset --hard` | Reset working directory and staging area to match commit |
| `grhk` | `git reset --keep` | Reset HEAD but keep local changes |
| `grhs` | `git reset --soft` | Reset HEAD but keep staging area and working directory |
| `gpristine` | `git reset --hard && git clean --force -dfx` | Reset to clean state, removing all untracked files and changes |
| `gwipe` | `git reset --hard && git clean --force -df` | Reset and clean working directory (keeping ignored files) |
| `groh` | `git reset origin/$(git_current_branch) --hard` | Hard reset to match origin's version of current branch |
| `grs` | `git restore` | Restore working tree files |
| `grss` | `git restore --source` | Restore files from a specific source |
| `grst` | `git restore --staged` | Unstage files (restore from staging area) |
| `gunwip` | `git rev-list --max-count=1 --format="%s" HEAD \| grep -q "--wip--" && git reset HEAD~1` | Remove work-in-progress commit if it exists |
| `grev` | `git revert` | Create new commit that undoes changes from previous commits |
| `grm` | `git rm` | Remove files from working tree and staging area |
| `grmc` | `git rm --cached` | Remove files from staging area but keep in working directory |
| `gcount` | `git shortlog --summary -n` | Show commit count by author, sorted by number of commits |
| `gsh` | `git show` | Show information about commits, tags, or other objects |
| `gsps` | `git show --pretty=short --show-signature` | Show commit with short format and signature verification |
| `gstall` | `git stash --all` | Stash all changes including untracked and ignored files |
| `gstu` | `git stash --include-untracked` | Stash changes including untracked files |
| `gstaa` | `git stash apply` | Apply most recent stash without removing it |
| `gstc` | `git stash clear` | Delete all stashes |
| `gstd` | `git stash drop` | Delete most recent stash |
| `gstl` | `git stash list` | List all stashes |
| `gstp` | `git stash pop` | Apply and remove most recent stash |
| `gsta` | On Git >= 2.13: `git stash push` | Create a new stash with optional message and pathspec |
| `gsta` | On Git < 2.13: `git stash save` | Create a new stash with message (older git versions) |
| `gsts` | `git stash show --patch` | Show changes in most recent stash as a patch |
| `gst` | `git status` | Show working tree status |
| `gss` | `git status --short` | Show working tree status in short format |
| `gsb` | `git status --short -b` | Show short status with branch information |
| `gsi` | `git submodule init` | Initialize git submodules |
| `gsu` | `git submodule update` | Update git submodules to match superproject |
| `gsd` | `git svn dcommit` | Commit to SVN repository (git-svn) |
| `git-svn-dcommit-push` | `git svn dcommit && git push github $(git_main_branch):svntrunk` | Commit to SVN and push to GitHub |
| `gsr` | `git svn rebase` | Rebase from SVN repository (git-svn) |
| `gsw` | `git switch` | Switch to a different branch |
| `gswc` | `git switch -c` | Create and switch to a new branch |
| `gswd` | `git switch $(git_develop_branch)` | Switch to development branch |
| `gswm` | `git switch $(git_main_branch)` | Switch to main branch |
| `gta` | `git tag --annotate` | Create an annotated tag |
| `gts` | `git tag -s` | Create a GPG-signed tag |
| `gtv` | `git tag \| sort -V` | List tags sorted by version numbers |
| `gignore` | `git update-index --assume-unchanged` | Mark files as unchanged to ignore local modifications |
| `gunignore` | `git update-index --no-assume-unchanged` | Stop ignoring local modifications to files |
| `gwch` | `git whatchanged -p --abbrev-commit --pretty=medium` | Show commit history with patches and abbreviated commit hashes |
| `gwt` | `git worktree` | Manage multiple working trees |
| `gwtls` | `git worktree list` | List all working trees |
| `gwtmv` | `git worktree move` | Move a working tree to a new location |
| `gwtrm` | `git worktree remove` | Remove a working tree |
| `gk` | `gitk --all --branches &!` | Open gitk GUI showing all branches in background |
| `gke` | `gitk --all $(git log --walk-reflogs --pretty=%h) &!` | Open gitk GUI showing all reflog entries in background |
| `gtl` | `gtl(){ git tag --sort=-v:refname -n --list ${1}\* }; noglob gtl` | List tags matching pattern, sorted by version in descending order |
### Main branch preference