Created
December 21, 2010 15:12
-
-
Save dinomite/750030 to your computer and use it in GitHub Desktop.
Stash local changes before doing `git svn rebase`
This file contains 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/env perl | |
# Drew Stephens <[email protected]> | |
# 2010-12-17 | |
# | |
# Stash local changes before doing `git svn rebase` | |
use strict; | |
use warnings; | |
my $applyStash = 0; | |
my $stashName = "gsrebase " . `date`; | |
my $stash = `git stash save $stashName`; | |
chomp $stash; | |
if ($stash ne 'No local changes to save') { | |
print "Stashing local uncommited changes\n"; | |
$applyStash = 1; | |
} | |
system('git svn rebase'); | |
if ($applyStash == 1) { | |
print "Applying stash of local uncommited changes\n"; | |
system('git stash pop'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I do this with git pull, I like to call this a dirty pull!