The repository for the assignments is public and Github does not allow the creation of private forks for public repositories.
The offical docs for creating a private fork by duplicating the repo are here.
For this class's assignments 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]:jakobottar/2022fall-image-processing.git
-
Create a new private repository on Github and name it
2022fall-image-processing.If you are unable to create a private repo, you can request unlimited private repos as a student by getting the student pack from Github.
-
Mirror-push your bare clone to your new
2022fall-image-processingrepository.Replace
<your_username>with your actual Github username in the url below.cd 2022fall-image-processing.git git push --mirror [email protected]:<your_username>/2022fall-image-processing.git
-
Remove the temporary local repository you created in step 1.
cd .. rm -rf 2022fall-image-processing.git -
You can now clone your
2022fall-image-processingrepository on your machine (in my case in thecodefolder).cd ~/code git clone [email protected]:<your_username>/2022fall-image-processing.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 upstream [email protected]:jakobottar/2022fall-image-processing.git git remote set-url --push upstream DISABLE
You can list all your remotes with
git remote -v. You should see:origin [email protected]:<your_username>/2022fall-image-processing.git (fetch) origin [email protected]:<your_username>/2022fall-image-processing.git (push) upstream [email protected]:usi-systems/2022fall-image-processing.git (fetch) upstream DISABLE (push)When you push, do so on
originwithgit push origin.When you want to pull changes from
upstreamyou can just fetch the remote and rebase on top of your work.git fetch upstream git rebase upstream/main
And solve the conflicts if any appear.