My issue is that I have a client, let's call them 'Evil Corp', that provides my company with lots of business through various projects, which we use GitHub repos for. Let's take 2 and call them 'TotallyNotPolluting' and 'CoveringUpPolluting'.
I would like for my employees to be able to clone the 'TotallyNotPolluting' repo into a folder 'EvilCorp' by default when cloning.
You can write a script like below. I've not tested it properly but this should give you the right direction to move it. The purpose of this shell script is to create a parent directory and then individually create each sub-folder, check if sub-folder is empty. If empty, clone the repo. This shell script can be distributed to employees as an executable then, when run, will clone repos into right places.
#create the directory, if it does not exist directoryName="<your directory name here>" mkdir -p directoryName repos="TotallyNotPolluting CoveringUpPolluting" forwardSlash="/" #go into directory pushd $directoryName for repo in $repos; do #check if directory is not present, if true, create the directory [ ! -d $repo ] && mkdir -p $repo #go into directory currentDirectory=$directoryName$forwardSlash$repo if [ "$(ls -A $currentDirectory)" ]; then echo "directory is not empty, skipping to clone" else pushd $directoryName$forwardSlash$repo git clone "git@$codeHost:$codeUser/$repo.git" fi done