Skip to content

Instantly share code, notes, and snippets.

@stepango
Created April 10, 2017 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stepango/3dad94c21c65607f2c9b204fa788b180 to your computer and use it in GitHub Desktop.
Save stepango/3dad94c21c65607f2c9b204fa788b180 to your computer and use it in GitHub Desktop.
new feature branch kotlin script
fun exec(str: String) = ProcessBuilder(str.split(" "))
.redirectInput(ProcessBuilder.Redirect.PIPE)
.redirectOutput(ProcessBuilder.Redirect.PIPE)
.redirectError(ProcessBuilder.Redirect.PIPE)
.start()
.inputStream
.reader()
.readLines()
.forEach(::println)
exec("git checkout upstream/develop")
exec("git checkout -b feature/${args[0]}")
exec("git pull upstream develop")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment