Skip to content

Instantly share code, notes, and snippets.

@ravikyada
Last active December 22, 2023 06:16
Show Gist options
  • Save ravikyada/c2fa910f6b50a8f3dc262fa572c4deee to your computer and use it in GitHub Desktop.
Save ravikyada/c2fa910f6b50a8f3dc262fa572c4deee to your computer and use it in GitHub Desktop.
Add Multiple Github Repo in Single Directory

check git remove by this command

git remote -v

Add second github remote

git remote add github https://github.com/organization/repo.git

check remote again

git remote -v

You can also remove old remote

git remote remove origin (change origin name according to you old remote-name)

From Now You should git pull/push with name of remotes:

git pull <remote-name> <branchname>
git pull github stag

Changes Upstrem Branch for New Remote

git branch --set-upstream-to=github/master main

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