Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub: make fork an "own project"

Tags:

git

github

People also ask

Can I fork my own repository in GitHub?

HI, This is interesting, the reason you can't fork your own repo is that a fork is not actually what people think it is. It's a common perception that a fork is a copy of some other repo, it looks like one and most of us thinks it behaves just like a copy but it isn't.

Is forking legal 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.

How do I make a GitHub fork?

Creating a fork on GitHub is as easy as clicking the β€œfork” button on the repository page. The fork will then appear in the list of your repositories on GitHub where you can clone it to your local machine and edit it. Once you are done editing, you push your commits back to the fork on GitHub.


To detach the fork and turn it into a standalone repository on GitHub, contact GitHub support.

https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/#commit-was-made-in-a-fork


In order to do this you need to duplicate the repository. The short version is:

  1. Create a new repository on GitHub.
  2. Clone the forked repository you want to detach from its parent.
  3. Push all branches in this clone to your new repository.

This is super easy:

  1. Clone the repo somewhere: git clone [email protected]:USERNAME/REPOSITORY.git (make double sure you have it cloned)
  2. Delete the repo in GitHub (Settings > Options > Delete this repository)
  3. Create a new blank repo in GitHub
  4. git remote set-url origin [email protected]:USERNAME/NEW_REPOSITORY.git (if you used the same name for the repo, then NEW_REPOSITORY == REPOSITORY πŸ‘πŸ»)
  5. git push
  6. πŸ™ŒπŸ»

(I use ssh, but if you use https your github urls will look like https://github.com/USERNAME/REPOSITORY.git)


First you should check if the licence is allowing you to do so, generally speaking Open Source enforces you to do so because it is all about software evolution whithout chains. If so then just create an new repo. Don't forget to credit the original authors and start your project.