Installation Guide

Install the complete alias set globally on macOS, Windows, or Linux.

Option A - PowerShell install

🪟 Windows
irm https://raw.githubusercontent.com/sahulkola/git-devkit/main/setup-aliases.ps1 | iex

Option B - Manual setup

🍎 macOS · 🪟 Windows · 🐧 Linux

🍎 macOS / 🐧 Linux

git clone https://github.com/sahulkola/git-devkit.git
cd git-devkit
bash setup-aliases.sh

🪟 Windows PowerShell

git clone https://github.com/sahulkola/git-devkit.git
cd git-devkit
powershell -ExecutionPolicy Bypass -File .\setup-aliases.ps1

🪟 Windows Command Prompt

git clone https://github.com/sahulkola/git-devkit.git
cd git-devkit
setup-aliases.bat

Verify

git aliases                   # list all configured aliases
git s                         # quick status
git lg                        # graph log

Top Day-to-Day Shortcuts

These are the most-used aliases for typical development flow.

AliasExpands ToDescription
git sstatus --short --branchFast status with current branch context
git apadd --patchStage only the exact hunks you want
git dsdiff --stagedReview staged changes before commit
git cmcommit -mCommit with an inline message quickly
git lglog --graph --pretty=...Visual graph log for quick history checks
git publishpush -u origin $(current branch)Push and track branch in one step
git cancommit --amend --no-editAppend staged fixes to the last commit
git pfpush --force-with-leaseSafe force push after rebase or squash
git cleanupbranch --merged | xargs git branch -dClean up merged local branches

Full Alias Reference

Complete list of all aliases grouped by category.

Shorthand

AliasExpands ToDescription
git sstatus --short --branchShort status with branch info
git ststatusFull status
git cocheckoutCheckout branch or file
git cbcheckout -bCreate and switch to new branch
git brbranchList or manage branches
git cicommitCommit staged changes
git cmcommit -mCommit with inline message
git cacommit --amendAmend last commit
git cancommit --amend --no-editAmend without changing message
git ddiffShow unstaged changes
git dsdiff --stagedShow staged changes
git aaddStage files
git aaadd --allStage all changes
git apadd --patchInteractively stage hunks
git ffetch --all --pruneFetch all remotes and prune
git plpullPull from remote
git pspushPush to remote
git pfpush --force-with-leaseSafe force push
git cpcherry-pickCherry-pick a commit

📜 Log & History

AliasExpands ToDescription
git lglog --graph --pretty=...Beautiful colored graph log
git lllog --oneline --decorate --all --graphAll branches one-line graph
git lastlog -1 HEAD --statShow last commit with stats
git todaylog --since=midnight --oneline --no-mergesCommits made today
git weeklog --since='1 week ago' --oneline --no-mergesCommits made this week
git contribshortlog --summary --numberedContributors ranked by commits

↩️ Undo & Fix

AliasExpands ToDescription
git discardcheckout --Discard working directory changes

🌿 Branch Management

AliasExpands ToDescription
git brabranch -aList all branches (local + remote)
git brdbranch -dDelete branch (safe)
git brDbranch -DForce delete branch
git mergedbranch --mergedList merged branches
git unmergedbranch --no-mergedList unmerged branches
git cleanupbranch --merged | xargs git branch -dDelete all merged branches
git gonefetch -p && branch -vv | grep goneFind branches with deleted remotes

📦 Stash

AliasExpands ToDescription
git ssstash saveStash with a message
git spstash popPop latest stash
git slstash listList all stashes
git sdstash dropDrop latest stash
git sastash applyApply stash without removing

🌐 Remotes

AliasExpands ToDescription
git rvremote -vList remotes with URLs
git syncfetch --all --prune && pullSync with all remotes
git publishpush -u origin $(current branch)Push and track current branch
git unpublishpush origin --delete $(current branch)Delete current branch from remote

🔄 Workflow

AliasExpands ToDescription
git wipadd -A && commit -m "WIP"Quick work-in-progress commit
git saveadd -A && commit -m "SAVEPOINT"Save all changes as checkpoint
git donefetch && rebase origin/mainRebase on latest main

ℹ️ Information

AliasExpands ToDescription
git aliasesconfig --get-regexp ^alias\.List all configured aliases
git whoamiconfig user.name && user.emailShow current git identity
git rootrev-parse --show-toplevelShow repository root path
git countrev-list --count HEADCount total commits
git statsdiff --statShow file change stats
git whoshortlog -sneList all contributors

📁 File Operations

AliasExpands ToDescription
git findls-files | grep -iFind file in repo by name
git ignoredls-files --others --ignored --exclude-standardList ignored files
git untrackedls-files --others --exclude-standardList untracked files

🔀 Diff & Merge

AliasExpands ToDescription
git conflictsdiff --name-only --diff-filter=UList conflicted files
git ourscheckout --ours --Resolve conflict with our version
git theirscheckout --theirs --Resolve conflict with their version
git patchdiff > /tmp/patch.patchSave diff as patch file

🛠️ Rebase & Advanced

AliasExpands ToDescription
git rirebase --interactiveInteractive rebase
git rcrebase --continueContinue rebase after resolving
git rarebase --abortAbort current rebase
git fixupcommit --fixupCreate fixup commit
git autofixlog | fzf | commit --fixupInteractive fixup with fzf