Skip to content

Instantly share code, notes, and snippets.

@decklin
Created June 22, 2011 13:47
Show Gist options
  • Save decklin/1040112 to your computer and use it in GitHub Desktop.
Save decklin/1040112 to your computer and use it in GitHub Desktop.
--- git-up.rb.orig 2011-06-22 00:37:46.000000000 -0400
+++ git-up.rb 2011-06-22 00:37:41.000000000 -0400
@@ -24,18 +24,17 @@
base = merge_base(branch.name, remote.name)
if base == remote.commit.sha
- puts "ahead of upstream".green
+ puts "ahead of upstream".blue
next
end
if base == branch.commit.sha
puts "fast-forwarding...".yellow
+ checkout(branch.name)
+ rebase(remote)
else
- puts "rebasing...".yellow
+ puts "diverged".red
end
-
- checkout(branch.name)
- rebase(remote)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment