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.
23 lines
364 B
23 lines
364 B
12 years ago
|
#!/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";
|