Last active
August 25, 2021 01:32
-
-
Save itsazzad/850eee8feb44493f5cdb14a2edf39d0e to your computer and use it in GitHub Desktop.
Git Organization: Create Repo, Add Remote, Push
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Target:" | |
read upstream | |
for f in *; do | |
if [ -d "$f" ]; then | |
cd $f | |
pwd | |
echo "$upstream/$f" | |
gh repo create $upstream/$f --public --confirm | |
git remote add upstream [email protected]:$upstream/$f.git | |
git push upstream | |
cd .. | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment