-
Notifications
You must be signed in to change notification settings - Fork 16
project setup
No one will be pushing directly to our class repo, instead each of us will be developing on our own "forks" of the class project and submitting our contribution in the form of "pull requests". If you haven't already, create a fork by...
- click on the Fork icon on the top-right hand corner of this page. This should create a linked copy (aka fork) of this repo onto your account.
Assuming you have the git
CLI (command line tool) installed, open a terminal and...
-
cd
(change directory) into the folder you want to download this project to (otherwise your terminal will default to cloning this project to your home folder).
In your forked GitHub repo page, click on the green "Code" button and copy the HTTPS git URL from there. NOTE make sure you are copying from your forked git URL page and not the class git URL from the class repo page. Then in your terminal run...
-
git clone YOUR_GIT_URL
(replacing 'YOUR_GIT_URL' with your copied git URL). -
Then navigate into the project folder,
cd paintArtware2.1
Assuming you've got your terminal in the paintArtware2.1
project folder, the next thing we need to setup is your project's "upstream". Because this project was cloned from your GitHub account, git knows that this local version on your computer is associated with a "remote" (online) version on your GitHub, this version is given the name "origin" by default. You can list all the associated remote versions of your project by running git remote -v
which will display the names and URLs for all the remote versions. This will be the version that you "push" (aka upload) code to when you've made changes locally so that the rest of your collaborators (and myself) can check in on your progress and also so that you can later create Pull Requests (PRs) when you're ready to contribute your work back into the main class repo. But in order for you to "pull" (aka download and merge) changes from the class repo made by your collaborators you'll need to let git know where our project's main code lives (ie. the class repo). To do this...
- run
git remote add upstream https://github.com/net-art-uchicago/paintArtware2.1.git
(that's the git URL to the class repo).
Now when you run git remote -v
you should see both your "origin" (your forked GitHub repo) as well as the "upstream" (the original class GitHub repo you just added) in your list of remote repositories. Later when there are updates made to the class repo that you want to download and merge into your local repository you'll be able to run git pull upstream main
which essentially means "pull" any changes made on the "main" branch of the "upstream" repo (ie the class repo) into my local project.