Skip to content

Instantly share code, notes, and snippets.

@BlazerYoo
Last active June 16, 2021 22:24
Show Gist options
  • Save BlazerYoo/eb25963039366cde47cb41f8e739bb8f to your computer and use it in GitHub Desktop.
Save BlazerYoo/eb25963039366cde47cb41f8e739bb8f to your computer and use it in GitHub Desktop.
Clone repo into replit without parent directory to immediately get coding [1]
#!/bin/bash
# first run chmod +x ./repl-repo1.sh
# then ./repl-repo.sh [link-to-repo.git]
echo '[1] Cloning repo...'
git clone $1 repo &> /dev/null
echo ' Cloned repo'
cd repo
echo '[2] Moving files...'
mv {.,}* .. &>/dev/null
echo ' Moved files'
cd ..
echo '[3] Removing parent directory...'
rm -r repo
echo ' Removed parent directory'
echo 'repl repo initialization complete'
@BlazerYoo
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment