Created
March 1, 2013 19:06
-
-
Save jkubicek/5066945 to your computer and use it in GitHub Desktop.
Merges the current branch into master and deletes the branch. Doesn't attempt to fix any issues and will fail if something goes wrong.
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/ruby | |
unless `git status -s`.strip.empty? | |
puts "Cannot merge-it when your working directory is dirty.\nClean that shit up, bruh" | |
exit | |
end | |
curr_branch = `git branch | grep "*" | sed "s/* //"`.strip | |
system("git checkout master && git merge #{curr_branch} && git branch -d #{curr_branch}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment