Place in Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
after installing posh-git
# Load posh-git example profile
. 'Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
Place in Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
after installing posh-git
# Load posh-git example profile
. 'Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
#!/bin/sh | |
# | |
# Prepend the branch name to the commit message | |
# Based on https://gist.github.com/bartoszmajsak/1396344 | |
# | |
# Add this file as [repo]/.git/hooks/prepare-commit-msg | |
# | |
# A couple notes: | |
# 1. The file must be executable (chmod +x prepare-commit-msg) | |
# 2. This works on a per-repo basis (unless you follow this guide https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook) |
Place in Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
function Get-GitStatus { & git status -sb $args }
New-Alias -Name gs -Value Get-GitStatus -Force -Option AllScope
function Get-GitCherryPick { & git cherry-pick $args }
New-Alias -Name gcp -Value Get-GitCherryPick -Force -Option AllScope
function Get-GitCommitEdit { & git commit -ev $args }
New-Alias -Name gce -Value Get-GitCommitEdit -Force -Option AllScope
function Get-GitCommit { & git commit -m $args }
New-Alias -Name gco -Value Get-GitCommit -Force -Option AllScope
Explanation of commands here
cmd:
git config --global alias.aa "add --all"
git config --global alias.bv "branch -vv"
git config --global alias.ba "branch -ra"
git config --global alias.bd "branch -d"
git config --global alias.cp "cherry-pick"
git config --global alias.ca "commit --amend"