Reputation: 553
I am working on Android studio and i wanted to push my android project to an organisation's repository but whenever i commit the changes it uploads the project to my username directory and not the Organisation's repository. Please explain me by taking this example- my username-abc organisation name-xyz repository name-123 so i want to upload my project to https://github.com/xyz/123
Upvotes: 2
Views: 2385
Reputation: 3118
Create a new repository under your organization's account, then add it as a new remote:
git remote add newRemote https://github.com/organization/repo.git
Then, push using this command:
git push newRemote master
If you wish to make the organization's repo the default repo, you must replace the remote called origin
:
git remote rm origin
git remote add origin https://github.com/organization/repo.git
You can list all currently configured remotes like so:
git remote -v
Upvotes: 8