Browse Source

git-config-rebase makes it less annoying to make 'git pull --rebase' DTRT

master
Jonathan "Duke" Leto 12 years ago
parent
commit
4865267dcc
  1. 22
      bin/git-config-rebase

22
bin/git-config-rebase

@ -0,0 +1,22 @@
#!/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";
Loading…
Cancel
Save