Skip to content

Instantly share code, notes, and snippets.

@OnorioCatenacci
Created April 8, 2013 16:00
Show Gist options
  • Save OnorioCatenacci/5337944 to your computer and use it in GitHub Desktop.
Save OnorioCatenacci/5337944 to your computer and use it in GitHub Desktop.
Everyday Git Aliases For Powershell (Github For Windows)
#Adjust these values for your own installation.
Set-Variable -Name defaultDirectory -option Readonly -value "c:/mydev"
Set-Variable -Name defaultRepository -option Readonly -value "myrepo"
Set-Variable -Name defaultBranch -option Readonly -value "workbranch"
#Per "Everyday git-aliases", do a rebase as opposed to a merge
function gpurr($repository=$defaultRepository, $branch=$defaultBranch)
{
& 'git' pull --rebase $repository $branch
}
#Also per "Everyday git-aliases", give me a quick rundown of my commits for the last day.
function gstandup()
{
$userId = & 'git' config user.email
& 'git' log --since yesterday --author $userId --pretty=short
}
@joejag
Copy link

joejag commented Apr 8, 2013

Hey, I'm glad you made this. I love improving my env too.

In Git in windows you can add aliases like: git config alias.ci commit
That makes git ci == git commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment