Skip to content

Instantly share code, notes, and snippets.

@Tewr
Created March 6, 2019 07:17
Show Gist options
  • Save Tewr/e03a391d49d83f8a17c3baa768ac8a43 to your computer and use it in GitHub Desktop.
Save Tewr/e03a391d49d83f8a17c3baa768ac8a43 to your computer and use it in GitHub Desktop.
Powershell Profile
#%HOMEPATH%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
function gitpushup { git rev-parse --abbrev-ref HEAD | foreach { git push --set-upstream origin $_ }}
set-alias git-pushup gitpushup
function gitmergedev { git rev-parse --abbrev-ref HEAD | foreach { if (git checkout develop) {git pull; git checkout $_;git merge develop; }}}
set-alias git-mergedev gitmergedev
function gitmergemas { git rev-parse --abbrev-ref HEAD | foreach { if (git checkout master) {git pull; git checkout $_;git merge master; }}}
set-alias git-mergemas gitmergemas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment