Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fork one directory on github

I have a project on github, which is a fork of a big project. I created a plugin for that but they told me they will not include the plugin, I have to ship it separately, so now I want to fork the already forked project, but not everything, just the directory where I did that plugin. Is it possible?

edit: Apparently on github i can't fork my own repository, so I think the answer's no.

like image 616
LtWorf Avatar asked Feb 15 '13 13:02

LtWorf


People also ask

How do I fork to a specific repository?

You can fork any repo by clicking the fork button in the upper right hand corner of a repo page. Click on the Fork button to fork any repo on github.com. Source: GitHub Guides.

Is it legal to fork in GitHub?

The TOS states you agree to allow viewing and forking. It doesn't state that you agree to allow redistribution or use. If the terms don't explicitly state that you allow those things, then unless your license allows them they aren't allowed.


1 Answers

You can use git filter-branch to rewrite the whole history of your repository, just to keep (and move) your plugin. Doing so allows you to keep your plugin history. Then use git submodule as https://stackoverflow.com/users/1967966/anh-nhan-nguyen suggested in answer https://stackoverflow.com/a/14895900/611560

Regards.

like image 78
Yann Droneaud Avatar answered Oct 29 '22 00:10

Yann Droneaud