Skip to content

Instantly share code, notes, and snippets.

View safor's full-sized avatar

Eugene Safrankov safor

View GitHub Profile
git config --get-regexp alias
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.unstage "reset HEAD --"
git config --global alias.lg "log --graph --oneline --decorate"
git config --global alias.last "log -1 HEAD"
@safor
safor / keybase.md
Created April 23, 2021 11:58
Keybase proof

Keybase proof

I hereby claim:

  • I am safor on github.
  • I am safor (https://keybase.io/safor) on keybase.
  • I have a public key ASAWDtniQ26s3E4vTKG7_NXj-nwkCO_MDF4LL11qyRfLugo

To claim this, I am signing this object:

@safor
safor / git-pull.ps1
Created January 21, 2021 12:15
PowerShell scripts
# Perform 'git pull' command on main|master branch in all subfolders
Get-ChildItem -directory -force -recurse -depth 1 -filter .git | ForEach-Object {
$cmd = "pull"
$path = $_.Parent.FullName
Push-Location $path
$branch = git rev-parse --abbrev-ref HEAD
if (($branch -eq "main") -or ($branch -eq "master")) {
Write-Host "$path [$branch]> git $cmd" -foregroundColor green
& git $cmd
} else {