u/Ayaanh0001

Image 1 — Saved myself from typing git status, git commit, git push repeatedly
Image 2 — Saved myself from typing git status, git commit, git push repeatedly
Image 3 — Saved myself from typing git status, git commit, git push repeatedly

Saved myself from typing git status, git commit, git push repeatedly

Useful Android Studio + PowerShell Git shortcuts on Windows

I got tired of repeatedly typing:

git status

git add .

git commit -m "message"

git push origin main

So I created shortcuts for Android Studio Terminal.

  1. Check which terminal Android Studio uses

Run:

$PSVersionTable

If PowerShell details appear → you're using PowerShell.

  1. Open PowerShell profile

Run:

notepad $PROFILE

If profile doesn't exist:

New-Item -Path $PROFILE -Type File -Force notepad $PROFILE

  1. Add these functions

function gs { git status }

function gad { git add $args }

function gitcm {

param([string]$message)

git commit -m "$message" }

function gpush { git push origin main }

  1. Reload profile

. $PROFILE

Usage:

gs for git status

gad . for git add .

gitcm "Fixed UI bug"

gpush for git push origin main

Note: Avoid names like gc, gp, gcm because PowerShell already uses many short aliases and they can conflict.

u/Ayaanh0001 — 2 days ago