Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git: Errors when staging changes in new repository #82026

Closed
cdoublev opened this issue Oct 6, 2019 · 3 comments · Fixed by #82995
Closed

Git: Errors when staging changes in new repository #82026

cdoublev opened this issue Oct 6, 2019 · 3 comments · Fixed by #82995
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues help wanted Issues identified as good community contribution opportunities verified Verification succeeded
Milestone

Comments

@cdoublev
Copy link

cdoublev commented Oct 6, 2019

  • VSCode Version: 1.38.1
  • OS Version: Windows 10 v1903

Steps to Reproduce:

  1. Add a folder in workspace
  2. Init a git repository in this folder
  3. Create a new file in this folder
  4. Stage change from the source control providers (scp) panel
  5. Append/change content in the file
  6. Stage change by using the blue icon in the left gutter (not from scp panel)

An error (OS) window pops up with the message "Git fatal: Not a valid object name HEAD".

Does this issue occur when all extensions are disabled?: Yes

@joaomoreno
Copy link
Member

I don't even see a gutter decoration.

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug git GIT issues labels Oct 10, 2019
@joaomoreno joaomoreno added this to the Backlog milestone Oct 10, 2019
@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Oct 10, 2019
@joaomoreno joaomoreno changed the title Git stage changes in new repository Errors when staging changes in new repository Oct 10, 2019
@joaomoreno joaomoreno changed the title Errors when staging changes in new repository Git: Errors when staging changes in new repository Oct 10, 2019
@cdoublev
Copy link
Author

cdoublev commented Oct 10, 2019

Thank you for looking at this. It seems that the file needs to have an extension in order to have the gutter indicators from git.

Hop this might help: https://gifyu.com/image/klDH

@anirudhrb
Copy link
Contributor

Since the repo is empty, there is no HEAD. That's what causes the error. I have attempted a PR (#82995). @joaomoreno please have a look.

@joaomoreno joaomoreno modified the milestones: Backlog, November 2019 Nov 29, 2019
@dbaeumer dbaeumer added the verified Verification succeeded label Dec 5, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues help wanted Issues identified as good community contribution opportunities verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants