Skip to content

Instantly share code, notes, and snippets.

@wevtimoteo
Last active March 14, 2019 18:24
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 wevtimoteo/f74bde8aa3d4bf845b9602668a8dd095 to your computer and use it in GitHub Desktop.
Save wevtimoteo/f74bde8aa3d4bf845b9602668a8dd095 to your computer and use it in GitHub Desktop.
# Refers to https://github.com/rubocop-hq/rubocop/pull/6686#discussion_r264747095
cd rubocop
git subtree split -P lib/rubocop/ast -b lib/ast
git subtree split -P spec/rubocop/ast -b spec/ast
cd ..
mkdir rubocop-astx
cd rubocop-astx
git init
git fetch ../rubocop lib/ast
git checkout -b master FETCH_HEAD
mkdir -p lib/ast
mv *.rb lib/ast
mv node lib/ast
# -> commit
git fetch ../rubocop spec/ast
git checkout -b specs FETCH_HEAD
mkdir -p spec/lib/ast
mv *.rb spec/lib/ast
# -> commit
git checkout master
git checkout -b moving-ast
git merge specs --allow-unrelated-histories
# -> add origin repo and push it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment