This is a testing repository for LIN 637 Computational Linguistics 2 at Stony Brook University. It contains background materials on the software used in the course, and students should take great care to read all the documents very carefully.
The repository also provides students with an opportunity to familiarize themselves with the workflow used in the class. All homeworks for the class are distributed as private repositories, and students have to submit their solutions via pull requests. The instructions below are part of every homework repository.
To start, fork the repository. Your account now contains a new online repository which is an exact copy of this one. Every folder corresponds to a homework exercise and contains one or more files. If the folder contains a file named instructions.mdown, check that one first. If no such file exists, the instructions are spread over the other files. You can edit these files directly in your repository, or you can first sync the repository to your computer so you can work on the assignments offline.
If you want a local copy, proceed as follows:
- Clone the forked repository to your computer.
In your forked repository, click on the green button labeled Clone or download and copy the URL.
Let's suppose that the URL is https://foo/bar.git for now.
Then open a terminal and type
git clone https://foo/bar.git
- Edit the files.
- Once you are ready to upload the homework, proceed as follows:
- Open a terminal and use
cdto move into the local clone of your forked repository. For example, if you cloned the repository into the folder hw1 under Downloads, the command is
git add .to indicate that all files should be added to the next revision snapshot.
git commit -m "some message"to create a new revision snapshot. Replace some message by a meaningful description, e.g. all exercises done or still need to add docstrings.
git push origin masterto sync your local changes to the forked repository.
- If you make changes at a later point, repeat the previous steps of
git add .,
git commit -mand
git push origin master.
- Open a terminal and use
- Clone the forked repository to your computer. In your forked repository, click on the green button labeled Clone or download and copy the URL. Let's suppose that the URL is https://foo/bar.git for now. Then open a terminal and type
Once you have uploaded all your solutions, create a pull request on the original homework repository to turn in the assignment.
The diagram below shows how files are being created and copied around by the various steps.
To learn more about
git, check out the interactive Github tutorial.