Skip to content

Instantly share code, notes, and snippets.

@taylorreiter
Created September 1, 2017 20:38
Show Gist options
  • Save taylorreiter/43d8fd8ead9c7f7d4f0291048024cc9d to your computer and use it in GitHub Desktop.
Save taylorreiter/43d8fd8ead9c7f7d4f0291048024cc9d to your computer and use it in GitHub Desktop.
code used to create new repo from previous

An example of how to create a new git repository from a previous git repository

git clone https://github.com/taylorreiter/IGI_preproposal.git
cd IGI_preproposal/computational_pilot
git filter-branch --subdirectory-filter computational_pilot -- --all
# renamed folder cultivar_seq
git init
git add .
git commit -m "First commit"
git remote add origin https://github.com/taylorreiter/cultivar_seq.git
git remote -v
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment