-
-
Save pjf/28679ae79cb343ccb524 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use autodie qw(:all); | |
use IPC::System::Simple qw(capturex systemx); | |
my $upstream = $ARGV[0] || "pjf"; | |
my $branch = capturex(qw(git rev-parse --abbrev-ref HEAD)); | |
chomp $branch; | |
systemx(qw(git push --set-upstream), $upstream, $branch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment