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 --
This commit is contained in:
44
EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec
Normal file
44
EthanBrown.GitAliases/EthanBrown.GitAliases.nuspec
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<metadata>
|
||||
<id>EthanBrown.GitAliases</id>
|
||||
<title>Git - Aliases</title>
|
||||
<version>0.0.1</version>
|
||||
<authors>Various</authors>
|
||||
<owners>Ethan Brown</owners>
|
||||
<summary>Git aliases</summary>
|
||||
<description>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 --
|
||||
</description>
|
||||
<projectUrl>http://github.com/Iristyle/ChocolateyPackages/</projectUrl>
|
||||
<tags>Git</tags>
|
||||
<!-- Eula is in installer
|
||||
<licenseUrl></licenseUrl>
|
||||
-->
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<iconUrl>https://github.com/ferventcoder/chocolateyautomaticpackages/raw/master/git/git.png</iconUrl>
|
||||
<releaseNotes></releaseNotes>
|
||||
<dependencies>
|
||||
<dependency id="git.install" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="tools\**" target="tools" />
|
||||
</files>
|
||||
</package>
|
30
EthanBrown.GitAliases/tools/chocolateyInstall.ps1
Normal file
30
EthanBrown.GitAliases/tools/chocolateyInstall.ps1
Normal file
@@ -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
|
||||
}
|
9
EthanBrown.GitAliases/tools/chocolateyUninstall.ps1
Normal file
9
EthanBrown.GitAliases/tools/chocolateyUninstall.ps1
Normal file
@@ -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
|
||||
}
|
Reference in New Issue
Block a user