7

I installed VS Code (version: 1.12.1) and after that I installed Git (version: 2.13.0.windows.1) on Windows 10 machine. Then:

  1. I created an Asp.Net project (img 1)

  2. I open it in VS Code, went to Source Control and clicked Initialize Repository (img 2)

  3. I tried to commit changes (img 3).

  4. And I saw this error message (img 4).
  5. Then I made sure that git was the provider (img 5)
  6. I went to the settings.json and override the git Path (img 6), by default it was set to null. But it doesn't solve the problem. I created another app from scratch and the same error message is shown.

Click here to see the screenshots, please

Here is the Git Log Output:

Using git 2.13.0.windows.1 from C:\Program Files\Git\cmd\git.exe
git rev-parse --show-toplevel
git rev-parse --show-toplevel
fatal: Not a git repository (or any of the parent directories): .git

fatal: Not a git repository (or any of the parent directories): .git

fatal: Not a git repository (or any of the parent directories): .git

git rev-parse --show-toplevel
fatal: Not a git repository (or any of the parent directories): .git

git init
git rev-parse --show-toplevel
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :../../AppData/Roaming/Code/User/settings.json
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :../../AppData/Roaming/Code/User/settings.json
git add -A -- .
git commit --quiet --allow-empty-message --file - --all

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'COMPAQ@PREPARA12.(none)')

git config --get-all user.name
git show :../../AppData/Roaming/Code/User/settings.json
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :../../AppData/Roaming/Code/User/settings.json
git commit --quiet --allow-empty-message --file -

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'COMPAQ@PREPARA12.(none)')

git config --get-all user.name
git show :../../AppData/Roaming/Code/User/settings.json
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

git for-each-ref --format %(refname) %(objectname)
git remote --verbose
git show :../../AppData/Roaming/Code/User/settings.json
git fetch
fatal: No remote repository specified.  Please, specify either a URL or a
remote name from which new revisions should be fetched.

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

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

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

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

git commit --quiet --allow-empty-message --file -

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'COMPAQ@PREPARA12.(none)')

git config --get-all user.name
git status -z -u
git symbolic-ref --short HEAD
git rev-parse master
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

git for-each-ref --format %(refname) %(objectname)
git remote --verbose
7
  • 1
    Start by configuring your email and name using git config as suggested in the log Commented May 14, 2017 at 0:23
  • Thank you very much! He heh. I am new to using Git, and I had fear of log outputs, but when I read what you said I understood that is very simple. Next time I'll read the logs without fear! Thanks! Commented May 14, 2017 at 1:57
  • Your welcome. Does it work as it should now? Commented May 14, 2017 at 2:01
  • Yes! I set the user.email and user.name as global and now even when I create a new project I don't get that message error again. Commented May 14, 2017 at 11:47
  • If I decide to change the email and name can I run this commands again, whether as global or just for a specific project (omitting --global)? In this case, it will override those values, right? In the new project's folder, I ran: git config user.name "Lucas". Are there any commands that show me the current values for email and name? Anyway, thanks for helping. You held a lot! Commented May 14, 2017 at 11:58

1 Answer 1

2

From above comments:

Read the log outputs from Git. Configure your user email and user name. One way to do that is to open command prompt. Then navigate to your folder using cd FILEPATH. Then configure your user email and user name. It can be configured globally or only within the current repo. Configure globally with

git config --global user.email "[email protected]"

then

git config --global user.name "Your Name"
Sign up to request clarification or add additional context in comments.

1 Comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.