Skip to content

Instantly share code, notes, and snippets.

View danieldreier's full-sized avatar

Daniel Dreier danieldreier

  • Stripe
  • Rochester, New York
View GitHub Profile
@zachfi
zachfi / gist:8966079
Last active February 28, 2018 20:54
git-split: Break off a sub directory into its own repo, keeping history.
#! /usr/bin/env ruby
require 'tmpdir'
require 'fileutils'
require 'pp'
def main()
directory = ARGV.shift
#!/usr/bin/env ruby
# Copyright 2014 Jeremy T. Bouse
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#