Skip to content

Instantly share code, notes, and snippets.

@itsazzad
Last active August 25, 2021 01:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsazzad/850eee8feb44493f5cdb14a2edf39d0e to your computer and use it in GitHub Desktop.
Save itsazzad/850eee8feb44493f5cdb14a2edf39d0e to your computer and use it in GitHub Desktop.
Git Organization: Create Repo, Add Remote, Push
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 git@github.com:$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