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
            Asked
            
        
        
            Active
            
        
            Viewed 2,023 times
        
    2
            
            
        - 
                    Check your remotes – Andrey Danilov Jun 07 '18 at 08:23
- 
                    Update you post with what exactly you have tried so far and the results – Pawel Laskowski Jun 07 '18 at 08:40
- 
                    Possible duplicate of [How to push a local Git repository to another computer?](https://stackoverflow.com/questions/2888029/how-to-push-a-local-git-repository-to-another-computer) – phd Jun 07 '18 at 10:55
1 Answers
8
            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
 
    
    
        vatbub
        
- 2,713
- 18
- 41
 
    