Skip to content

Instantly share code, notes, and snippets.

@suptejas
Last active June 5, 2021 10:14
Show Gist options
  • Save suptejas/117454bd607cf650c378053b94ab60dc to your computer and use it in GitHub Desktop.
Save suptejas/117454bd607cf650c378053b94ab60dc to your computer and use it in GitHub Desktop.
Git Alias Powershell Profile
# ⭐ If you find this useful!
# Paste the following configuration into your powershell profile
# Find it at: %USERPROFILE%\Documents\WindowsPowerShell Microsoft.PowerShell_profile.ps1 (Create the file if it doesn't exist)
# Push to origin master
# Usage: gpu
function git_push {
git push -u origin master
}
# Pull from origin master
# Usage: gpl
function git_pull {
git pull origin master
}
# Get the current status
# Usage: gs
function git_status {
git status
}
# Add, Commit and Push to origin master
# Usage: deploy "this is my commit message"
function deploy {
Param(
$name
)
git add .
git commit -m $name
git push -u origin master
}
# Aliases For The Functions
Set-Alias gpu git_push
Set-Alias gpl git_pull
Set-Alias ga git_add
Set-Alias gs git_status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment