DeeprajPandey / cs1101-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem Set 0

This problem set is ungraded and is set up to help you get acquainted with the submission workflow. Follow the steps and email course staff if you have any questions.

Setup

Clone this repository and open the directory. Here, <USERNAME> is your GitHub username.

$ git clone https://github.com/CS1101-Spring2021/pset0-<USERNAME>.git
$ cd pset0-<USERNAME>/

Create a new branch and switch to it

$ git checkout -b submission0

Working on your Solution

There are two commands you will need to work on your submission. To compile, link, and create the executable, use

$ make addition

To delete the obj file and the executable,

$ make clean

Grading

The pset comes with an autograder with a few public test cases to help you with your solution. There will be more hidden test cases that your program will have to pass for full credit.

To set up the grader, run the following command only once.

$ make init_grader

After the autograder has been set up, you can use the following command to check your code with the provided test cases

$ make grade

Snapshots

Work on your solution on this branch. You can check which files were modified with the status command.

$ git status

Every once in a while, commit your work.

Committing is a two-step process.

  • Add specific files to the staging area. You can specify multiple files too.
    $ git add addition.c

    You can also add all the files which were modified (be careful). It's good practice to specify the files you want committed and write targeted commit messages for your changes

    $ git add .
  • Commit your changes

    The -m flag adds a message for your commit. You write your message in double quotes following the flag. For an example of where the message shows up, check this commit 6eaa760.

    $ git commit -m "Add print statement"
Push all your commits to the remote repo.

Use this command only the first time you push. --set-upstream will add a new branch of the same name in the remote repository

$ git push --set-upstream origin submission0

For every subsequent push, use this

$ git push

Gearing for Submission

When you are done with the solution and you have pushed all your commits to the `submission0` branch, merge the submission branch to main.
  • First ensure that you are on the main branch and that there are no differences between the remote copy and your local copy
    $ git checkout main
    
    $ git pull
  • Now, merge your submission branch to main
    $ git merge submission0

Push the new changes in main to the remote repo

$ git push

About


Languages

Language:Python 61.0%Language:Makefile 34.0%Language:C 5.0%