Created
July 25, 2012 15:48
-
-
Save drlongnecker/3176891 to your computer and use it in GitHub Desktop.
Lazy Git Merge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for when you're just too lazy to type out the merge command | |
# and change branches | |
function merge([string] $target, [string] $source) { | |
if ($source -eq "") { | |
$symbolicref = git symbolic-ref HEAD | |
$source = $symbolicref.substring($symbolicref.LastIndexOf("/") +1) | |
} | |
write-host "Merging $source into $target" -for white -ba red | |
git checkout $target; git merge $source; git checkout $source | |
write-host "Done!" -for black -ba green | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment