Keith
Keith

Reputation: 4931

Your repository has no remotes configured to push to

I am using Visual Studio Code and running into the message below while trying to check in.

Your repository has no remotes configured to push to.

This is right after I upgrade from the April version on the Macintosh to the May version. I upgraded since I was getting an infinite progress bar during a git update. Does anybody have any ideas how to fix this? I have used the command line to verify that I do indeed have remotes configured. Can't post them here since it will show inter company info :(. Please help.

Upvotes: 59

Views: 125945

Answers (5)

Vinay Rajbhar
Vinay Rajbhar

Reputation: 21

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.

Upvotes: 2

Iman
Iman

Reputation: 18956

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

Upvotes: 68

avula vyas
avula vyas

Reputation: 31

If you are using VS Code. 1.Go to View->Command pallete->git:add remote (This will create a remote) 2.Give a name(Usually the same as the project name) 3.It will now ask you to give a repository url, Create one and paste the link. 4. You can commit and push accordingly.

Upvotes: 1

Madadinoei
Madadinoei

Reputation: 70

enter

git remote -v

if see like this result

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

Close Vs Code And Open Again

Upvotes: 1

Rohit Poudel
Rohit Poudel

Reputation: 1887

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)

Upvotes: 10

Related Questions