Skip to content

Instantly share code, notes, and snippets.

@geluso
Last active August 8, 2018 22:29
Show Gist options
  • Save geluso/0ff455b78370eb529bb21573a4ec509e to your computer and use it in GitHub Desktop.
Save geluso/0ff455b78370eb529bb21573a4ec509e to your computer and use it in GitHub Desktop.
# Replace github usernames once with all students in class
# force the class to all have the same name for their repos per assignment
# pass the name of the repo to `d1cloner` to clone it for all the class.
# This makes one directory for the assignment, with subdirectories of
# students names with each students cloned repo. Make sure the students
# merge their changes back to master so you have easy access.
#
# d1cloner data-structures-and-algorithms
function d1cloner() {
mkdir $1
cd $1
git clone https://github.com/AOhassan/$1 ahmed
git clone https://github.com/AmyCohen/$1 amy
git clone https://github.com/brandon-fenty/$1 brandon
git clone https://github.com/Seiyaroo/$1 nick
git clone https://github.com/spinaltaper/$1 panos
git clone https://github.com/PaulSuarez1/$1 paul
git clone https://github.com/FavoredFortune/$1 sooz
git clone https://github.com/tara-johnson/$1 tara
git clone https://github.com/GoldBeardSea/$1 tim
git clone https://github.com/thetravisw/$1 travis
git clone https://github.com/louiethe17th/$1 tyler
}
# Companion to d1cloner. change into a directory that's
# been cloned. This script moves into every student folder
# and pulls changes from master. It's especially useful for
# pulling in changes from students data structure repos
# which are updated daily.
function pullups() {
for REPO in `ls`
do
cd $REPO
git reset --hard
git pull
cd ..
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment