-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Git: fatal: ambiguous argument 'HEAD~': unknown revision or path not in the working tree. #44776
Copy link
Copy link
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buggitGIT issuesGIT issuesgood first issueIssues identified as good for first-time contributorsIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunitiesverifiedVerification succeededVerification succeeded
Milestone
Description
Windows 10/Insiders
Repro:
- Open a folder
- Init git repo
- Add files and do a commit
- Undo last commit
Looking for git in: C:\Program Files\Git\cmd\git.exe
Using git 2.13.2.windows.1 from C:\Program Files\Git\cmd\git.exe
> git rev-parse --show-toplevel
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 rev-parse --show-toplevel
> git init
> git rev-parse --show-toplevel
> git config --get commit.template
Open repository: c:\Users\daimms.REDMOND\Documents\playground\t
> 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) --sort -committerdate
> git remote --verbose
> git check-ignore -z --stdin
> git check-ignore -z --stdin
> git add -A -- c:\Users\daimms.REDMOND\Documents\playground\t\script-1.bat
> 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) --sort -committerdate
> git remote --verbose
> git add -A -- c:\Users\daimms.REDMOND\Documents\playground\t\.vscode\tasks.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) --sort -committerdate
> git remote --verbose
> git commit --quiet --allow-empty-message --file -
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse master
> git rev-parse --symbolic-full-name --abbrev-ref master@{u}
fatal: no upstream configured for branch 'master'
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git config --get commit.template
> git show -s --format=%H
%B HEAD
> git reset HEAD~
fatal: ambiguous argument 'HEAD~': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
> git show -s --format=%H
%B HEAD
> git reset HEAD~
fatal: ambiguous argument 'HEAD~': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buggitGIT issuesGIT issuesgood first issueIssues identified as good for first-time contributorsIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunitiesverifiedVerification succeededVerification succeeded
