From 28dafef924598e54450eaf80469b11f0be4a6b2b Mon Sep 17 00:00:00 2001 From: Iristyle Date: Tue, 12 Mar 2013 18:37:36 -0400 Subject: [PATCH] EthanBrown.GitAliases aliases = config --get-regexp alias amend = commit --amend bl = blame -w -M -C changed = status -sb f = !git ls-files | grep -i hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) [%an]%Creset' --abbrev-commit --date=relative last = log -p --max-count=1 --word-diff pick = add -p stage = add standup = log --since yesterday --oneline --author Iristyle stats = diff --stat sync = ! git fetch upstream -v && git fetch origin -v && git checkout master && git merge upstream/master undo = reset head~ unstage = reset HEAD wdiff = diff --word-diff who = shortlog -s -e -- --- .../EthanBrown.GitAliases.nuspec | 44 +++++++++++++++++++ .../tools/chocolateyInstall.ps1 | 30 +++++++++++++ .../tools/chocolateyUninstall.ps1 | 9 ++++ 3 files changed, 83 insertions(+) create mode 100644 EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec create mode 100644 EthanBrown.GitAliases/tools/chocolateyInstall.ps1 create mode 100644 EthanBrown.GitAliases/tools/chocolateyUninstall.ps1 diff --git a/EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec b/EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec new file mode 100644 index 0000000..3ecbe19 --- /dev/null +++ b/EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec @@ -0,0 +1,44 @@ + + + + EthanBrown.GitAliases + Git - Aliases + 0.0.1 + Various + Ethan Brown + Git aliases + My standard Git aliases + + aliases = config --get-regexp alias + amend = commit --amend + bl = blame -w -M -C + changed = status -sb + f = !git ls-files | grep -i + hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) [%an]%Creset' --abbrev-commit --date=relative + last = log -p --max-count=1 --word-diff + pick = add -p + stage = add + standup = log --since yesterday --oneline --author Iristyle + stats = diff --stat + sync = ! git fetch upstream -v && git fetch origin -v && git checkout master && git merge upstream/master + undo = reset head~ + unstage = reset HEAD + wdiff = diff --word-diff + who = shortlog -s -e -- + + http://github.com/Iristyle/ChocolateyPackages/ + Git + + false + https://github.com/ferventcoder/chocolateyautomaticpackages/raw/master/git/git.png + + + + + + + + + diff --git a/EthanBrown.GitAliases/tools/chocolateyInstall.ps1 b/EthanBrown.GitAliases/tools/chocolateyInstall.ps1 new file mode 100644 index 0000000..b0716e6 --- /dev/null +++ b/EthanBrown.GitAliases/tools/chocolateyInstall.ps1 @@ -0,0 +1,30 @@ +$package = 'EthanBrown.GitAliases' + +try { + # partially inspired by + # https://git.wiki.kernel.org/index.php/Aliases + # https://gist.github.com/oli/1637874 + # https://gist.github.com/bradwilson/4215933 + + git config --global alias.aliases 'config --get-regexp alias' + git config --global alias.amend 'commit --amend' + git config --global alias.bl 'blame -w -M -C' + git config --global alias.changed 'status -sb' + git config --global alias.f '!git ls-files | grep -i' + git config --global alias.hist "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue) [%an]%Creset' --abbrev-commit --date=relative" + git config --global alias.last 'log -p --max-count=1 --word-diff' + git config --global alias.pick 'add -p' + git config --global alias.stage 'add' + git config --global alias.standup 'log --since yesterday --oneline --author Iristyle' + git config --global alias.stats 'diff --stat' + git config --global alias.sync '! git fetch upstream -v && git fetch origin -v && git checkout master && git merge upstream/master' + git config --global alias.undo 'reset head~' + git config --global alias.unstage 'reset HEAD' + git config --global alias.wdiff 'diff --word-diff' + git config --global alias.who 'shortlog -s -e --' + + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +} diff --git a/EthanBrown.GitAliases/tools/chocolateyUninstall.ps1 b/EthanBrown.GitAliases/tools/chocolateyUninstall.ps1 new file mode 100644 index 0000000..da4a2f7 --- /dev/null +++ b/EthanBrown.GitAliases/tools/chocolateyUninstall.ps1 @@ -0,0 +1,9 @@ +$package = 'EthanBrown.GitAliases' + +try { + Write-Host "Manually edit $ENV:USERPROFILE\.gitconfig to revert package changes" + Write-ChocolateySuccess $package +} catch { + Write-ChocolateyFailure $package "$($_.Exception.Message)" + throw +}