3

I am new to git and have been having some trouble with committing from Visual Studio. Just recently, Visual Studio started to not update my changes. Then when I tried to commit it gave me multiple errors. The changes disappeared though. The errors from the output.

  1. Git: Failed to execute git

  2. git fetch fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched.

  3. fatal: no upstream configured for branch 'master'

This just started happening after many commits. I looked all over the forums but have had no success. Everything in the git config --list is set accordingly. It is a private repository though. Would that effect anything?

2 Answers 2

1

first of all,

set your remote repository using,

git remote add upstream repsitory_url 

it will solve your 2 and 3 error. it seems you dont have any remote repository to push thats why. so copy your repo name and add it into your project using above command.

for eg:

git remove add upstream github.io/my_prj/proj.git 
Sign up to request clarification or add additional context in comments.

2 Comments

Can you change the remote upstream url? Its set to a old repository. I tried and it gave me fatal.
you can... you can add multiple remote . it will be differentiated by origin/upstream. so if you setted origin you can add upstream also...
0

I just re-opened my same directory and it somehow fixed everything. I guess when it re-opened Visual Studio it went one directory to far up and would not recognize it. ~/code/src/code2/src2 for some reason it opened src and not the 'code2' directory.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.