Your repository has no remotes configured to push to

Check the Github adding a remote article official doc which have better code highlighting and infos

but if you are an experienced user, just check out below commands and note that only the first command is required and second one is just for verifying and will return related repo details.

git remote add origin https://github.com/user/repo.git
    
git remote -v

Git Remote add Command dissection

  • params:
    1. remote name: origin (a default name for a remote Repo in Git )
    2. remote url: https://github.com/user/repo.git (in this example)

Working with Remotes To be able to collaborate on any Git project, you need to know how to manage your remote repositories. Remote repositories are versions of your project that are hosted on the Internet or network somewhere. You can have several of them, each of which generally is either read-only or read/write for you. Collaborating with others involves managing these remote repositories and pushing and pulling data to and from them when you need to share work. Managing remote repositories includes knowing how to add remote repositories, remove remotes that are no longer valid, manage various remote branches and define them as being tracked or not, and more. In this section, we’ll cover some of these remote-management skills.

Showing Your Remotes To see which remote servers you have configured, you can run the git remote command. It lists the shortnames of each remote handle you’ve specified. If you’ve cloned your repository, you should at least see origin – that is the default name Git gives to the server you cloned from:

$ git clone https://github.com/schacon/ticgit

Cloning into 'ticgit'...

remote: Reusing existing pack: 1857, done.

remote: Total 1857 (delta 0), reused 0 (delta 0)

Receiving objects: 100% (1857/1857), 374.35 KiB | 268.00 KiB/s, done.

Resolving deltas: 100% (772/772), done.

Checking connectivity... done.

$ cd ticgit

$ git remote

origin

You can also specify -v, which shows you the URLs that Git has stored for the shortname to be used when reading and writing to that remote:

$ git remote -v

origin  https://github.com/schacon/ticgit (fetch)

origin  https://github.com/schacon/ticgit (push)

Restart VS Code editor

use below commands on vscode:

command1: on vscode terminal change directory to project folder

to push your vscode on github:

command2: git push -u origin master

github signin popup will appear signed it

goto GitHub account repository and refresh it example-->> https://github.com/username/projectfoldername

it worked for me and I hope it will solve your problem now your VS Code file will be available on GitHub.


enter

git remote -v

if see like this result

origin https://github.com/xxx/yyy

Close Vs Code And Open Again