The examples use csci265 and assign1 as the course and assignment ids and crazydude as a student loginid.
| Note that to push a branch use
git push origin BRANCHNAME To see available branches use git branch -a |
...and to store that in a specific directory, use
git clone csci:/csci265/crazydude/assign1 --branch branchname dirname
| Note: "master" can be replaced with "main" as the name
of the core branch after an initial commit in the repo, using the command
git branch -M main Unfortunately that isn't quite compatible with our git submit structure yet, so I've left the "master" terminology in place |
Note: handling late submissions can be a bit tedious manually, so I've put together a script that will check each repository and pull any that have changed since you did the checkout. The only drawback is that it only checks repositories that had actually been forked by the student before you did the checkout (e.g. if you do your checkout after the submission deadline, then a student does their fork/clone/edit/submit, the script won't detect their submission.
It isn't pretty or robust, but it's functional, sample usage is:
pullChanges.sh csci330 lab6
#! /bin/bash
if [ $# -lt 2 ] ; then
echo "correct use is"
echo " $0 course item"
echo "e.g. $0 csci265 lab1"
echo "...assumes you have previously done a"
echo " gits checkout course item"
echo "from this same directory"
exit 0
fi
repo=$2
course=$1
top=$PWD
for student in ${course}/*/${repo} ; do
cd ${student}
echo "${student}"
git pull
d=$(git log -1 --format=%cd 2>1& )
echo "${d}"
echo " "
cd ${top}
done
|
Note the add/commit/push sequence can get pretty tedious if you have 60+ students, so here's a script that will add/commit/push all of them at once after you've finished putting feedback in the student directories.
Sample usage is:
pushChanges.sh csci330 projectFeedback
#! /bin/bash
if [ $# -lt 2 ] ; then
echo "correct use is"
echo " $0 course item"
echo "e.g. $0 csci265 lab1"
echo "...assumes you have previously done a"
echo " gits checkout course item"
echo "from this same directory"
exit 0
fi
repo=$2
course=$1
top=$PWD
commitMsg="marks and feedback"
for student in ${course}/*/${repo} ; do
cd ${student}
echo "${student}"
git add .
git commit -m "${commitMsg}"
git push
cd ${top}
done
|