Skip to content
Browse files

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

…DTRT
  • Loading branch information...
1 parent d80a16a commit 4865267dcc812a711b86065f84aa52947c6ea56d @leto committed
Showing with 22 additions and 0 deletions.
  1. +22 −0 bin/git-config-rebase
View
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";

0 comments on commit 4865267

Please sign in to comment.
Something went wrong with that request. Please try again.