When you create a new gradeable, specify that students will submit their work by version control (GIT). Note: this selection cannot be modified after initial gradeable creation.
If this is a team assignment, encourage the students to form their teams through the Submitty interface promptly, so they are not delayed by the creation of their team version control repository.
Generating Submitty Server Version Control Repositories
Once you have created the gradeable, you may create empty repositories
for each student/team for that assignment. The provided script
generate_repos.py creates a bare shared repository with restricted
The script accepts a
--help flag to explain the arguments it
accepts. The basic usage:
sudo /usr/local/submitty/bin/generate_repos.py <semester> <course_code> <project_name/gradeable_id>
NOTE: In order to use this script, instructors for courses needing repositories should be given limited sudo access to run this script.
If the third argument is not an existing gradeable_id, the user is prompted to confirm to make these repositories. If confirmed, an empty repository is made for every user in the course. If it is an existing gradeable, the script checks to see if this gradeable is an individual or team assignment. If it is an individual gradeable, an empty repository is made for every user. If it is a team gradeable, an empty repository is made for every team that has been formed so far. The script can be re-run when additional teams are formed.
Permissions on these repositories (which is handled automatically by the generate script) is that these directories and files must be readable and writeable by www-data or else students won’t be able to clone/push/etc.
All repositories are stored under
Cloning Your Repositories
After the instructor has created the git repositories, your students and you can checkout their repositories from
access restricted to the student (or members of the team), the instructor(s), and the full access graders.
Public Repositories (e.g., Github)
Private, Instructor-Created Repositories (e.g., Github Classroom)
Private, Student-Created Repositories (e.g., Github)
Uploading Instructor Provided Code to GIT
First, generate the repos as directed above. clone/download the following script:
Then, to distribute instructor-provided code, clone/download the following script:
GIT Provided Code Script
Prepare a simple text file (e.g.,
students.txt) with the usernames of all of your students. One username per line.
Prepare a directory with the files you would like to provide to each student.
Run the script:
python3 git_provided_code.py <server> <semester> <course> <repo/gradeable> <path to provided code> <initial commit message> <student usernames file>
python3 ~/Submitty/GIT_CHECKOUT/InstructorTools/GitProvidedCode/git_provided_code.py https://submitty.myuniversity.edu/git s19 csci1200 hw1 ~/teaching/s19/hw1/src 'provided hw1 code' ~/teaching/s19/students.txt
IMPORTANT: Note that without a trailing slash on the provided code directory
srcdirectory and its contents will be added to the repositories.
With the trailing slash (
srcdirectory will NOT be added to the repository, only the contents of the
srcdirectory will be added to the repositories.
This script will create a directory structure in the current directory for the specified repository/gradeable, clone each student repository, create a
providedbranch, and add the files to that branch.
If a file has been removed from the provided code directory, it will be removed from the branch in the repository.
If the repository does not yet contain a
masterbranch, it will be created and the code from the provided branch will be copied/merged into the new branch. If the
masterbranch already exists, it will not be modified. All other branches are unmodified.
See also: Student: Assignment Submission via GIT
See also: System Administrator: Setting up Internal Git