How I created a second fork of a Github repo

Tried following the steps mentioned in but it didn’t work for me for some reason. Documenting this for personal purposes.

Was working on a new machine, so had to:

Set up Git

git config –global “Username”
git config –global “youremail@yourdomain”
git config –global credential.helper cache
git remote add origin

Generate SSH Keys 

cd ~/.ssh
ssh-keygen -t rsa -C “youremail@yourdomain”

Clone the original Github Repo  on local machine, rename the origin branch as stated here
git clone
cd SourceRepo/
git remote rename origin upstream

Created a new empty repo on the Github account

Push code from local machine to Github

The following didn’t work for me – git requested username/password. I gave it the correct values but it threw an authentication error –> git push -u origin master


git push master –force

Edit: The only downsides to this are:

1. the second fork is not identified as a fork of the original repository, and
2. you cannot name the second repository with the same name on Github. This could be  a problem if your CMAKE compile files rely on a specific repository name.



About Alexis Chan
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s