You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
364 B
22 lines
364 B
#!/usr/bin/env perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
use autodie;
|
|
|
|
my ($remote, $branch) = @ARGV;
|
|
open(my $fh, ">>.git/config");
|
|
|
|
$remote ||= 'origin';
|
|
$branch ||= 'master';
|
|
|
|
my $config =<<CONFIG;
|
|
[branch "$branch"]
|
|
remote = $remote
|
|
merge = $branch
|
|
rebase = true
|
|
CONFIG
|
|
|
|
print $fh $config;
|
|
close $fh;
|
|
print "Added the following to .git/config:\n$config\n";
|
|
|