Publish an organization repository to GitHub is not the default behavior of VS Code. We start GitHub with an individual account, and we log in as individual within VS Code. That's why default behavior would be
To publish a repository to one of your organizations in Github, you need to follow the following steps:
Git: Add remote...by pressing
Ctrl+ Shift+ P, copy and paste the URL of your empty repo, then set a name. This name is any name, and will not impact anything.
Set a name for your remote, this name is just a name and would not affect anything. In the screenshot, I set a name samples
After naming the Remote, now you can publish your repository to provided URL (remote URL)
The most common mistake which could lead to not successfully publising the repository is to create a not empty repository. This sounds strange, but it is true for new developers.
In case you want to change the remote, you can run command
Git: Remove Remote.
Brian Cao @ BizChain Vietnam