The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
-
Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
git clone --bare [email protected]:directus/app.git
-
Create a new private repository on Github and name it
easytrace.If you are unable to create a private repo, you can request unlimited private repos as a studant by getting the student pack from Github.
-
Mirror-push your bare clone to your new
apprepository.Replace
<your_username>with your actual Github username in the url below.cd app.git git push --mirror [email protected]:<your_username>/app.git
-
Remove the temporary local repository you created in step 1.
cd .. rm -rf app.git -
You can now clone your
apprepository on your machine (in my case in theDeveloperfolder).cd ~/Developer git clone [email protected]:<your_username>/app.git
-
If you want, add the original repo as remote to fetch (potential) future changes. Make sure you also disable push on the remote (as you are not allowed to push to it anyway).
git remote add directus-repo [email protected]:directus/app.git git remote set-url --push directus-repo DISABLE
You can list all your remotes with
git remote -v. You should see:origin [email protected]:<your_username>/app.git (fetch) origin [email protected]:<your_username>/app.git (push) directus-repo [email protected]:directus/app (fetch) directus-repo DISABLE (push)When you push, do so on
originwithgit push origin.When you want to pull changes from
directus-repoyou can just fetch the remote and rebase on top of your work.git fetch directus-repo git rebase directus-repo/master
And solve the conflicts if any