Skip to content

Instantly share code, notes, and snippets.

@sheepmaster
Created November 4, 2011 13:49
Show Gist options
  • Select an option

  • Save sheepmaster/1339357 to your computer and use it in GitHub Desktop.

Select an option

Save sheepmaster/1339357 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
my $ref = `git stash create`;
chomp($ref);
$ref ||= 'HEAD';
system(qw[git push --force mirror], "$ref:refs/remotes/__mirror");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment