-
Notifications
You must be signed in to change notification settings - Fork 13
Move a folder from one repo to another
Bhargava Sana edited this page Jun 21, 2018
·
5 revisions
These are steps for moving dora from under warehouse repo to its own repo fasttrips-dora.
- Clone the source repo at a new location say C:\temp, disconnect remote origin (to be safe), and filter only the folder we need (in this case dora).
C:\temp> git clone https://github.com/sfcta/warehouse
C:\temp> cd warehouse
C:\temp> git remote rm origin
C:\temp\warehouse> git filter-branch --subdirectory-filter dora -- --all
- Clone the destination repo also in C:\temp and change directory into it.
C:\temp> git clone https://github.com/sfcta/fasttrips-dora
C:\temp> cd fasttrips-dora
- Add source repo as a remote to destination repo, pull it in, and remove the newly added remote souce repo.
C:\temp\fasttrips-dora> git remote add warehouse ../warehouse/
C:\temp\fasttrips-dora> git pull warehouse master --allow-unrelated-histories
C:\temp\fasttrips-dora> git remote rm warehouse
- Pull from remote origin and push the transferred and merged code to remote origin.
C:\temp\fasttrips-dora> git pull
C:\temp\fasttrips-dora> git push
Get Started
- Back-End Setup
- Setting up your development environment
- Building Prospector locally
- Publishing your changes
Other Useful Links
- Recipes for typical tasks
- Glossary
- Publishing instructions for CMP standalone site
- Deploying a new release GitHub Pages and Prospector
Platform Considerations
Background Information