Clone this repo and cd into the cloned folder (with the forkit.mjs file).
Note
You will need to have Node.js installed.
- Create an empty private repo on GitHub (
private_fork). - In the terminal, run
node forkit.mjs <public_repo_URL> <private_fork_URL> [<path_to_clone_to>]
Note
If no path_to_clone_to is provided, the private fork will be cloned to a folder in the current directory.
node forkit.mjs https://github.com/user/foo.git https://github.com/user/private-foo.git ../fooor simply
node forkit.mjs user/foo user/private-foo ../foocd <private_fork_folder>git pull upstream <branch_name>git push origin <branch_name>
git push upstream <branch_name>