Skip to content

fix: #200773, handle branch creation in new repos #247394

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

kunalpanchal
Copy link

@kunalpanchal kunalpanchal commented Apr 25, 2025

Fixes #200773

  • improve target handling in branch command
  • handle branch creation in new repos

Steps to test:

  • Create new folder and enter folder: mkdir test1 && cd test1
  • Open vscode: `code . --disable-extensions
  • Use activity bar to initialize new repo
  • Create new text file but don't check it in
  • Use command palette to create new branch Git: Create Branch with name test
  • No more error - "Error: Git: fatal: Head is not a commit and a branch test cannot be created from it"

- improve target handling in branch command
@kunalpanchal kunalpanchal marked this pull request as ready for review April 28, 2025 07:55
@kunalpanchal
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Git - Branch on new local repo fails
2 participants