zed icon indicating copy to clipboard operation
zed copied to clipboard

Using Git Panel to initialise new repository doesn't populate available branches

Open tashi21 opened this issue 6 months ago • 1 comments

Summary

When I initlaise a new git repository in an empty project using the Git Panel, the main branch isn't automatically selected (or even showed as an option).

Description

Steps to reproduce:

  1. Open a new project in Zed.
  2. Create new empty Git repository using the Git Panel.
  3. No selected branch in the branches picker (or available as an option).
  4. Reload workspace and the branch will be selected.

It may be important to note that in some instances the main branch does get selected, so it seems that this bug is a bit unpredictable and may or may not appear in some cases. I didn't change any setting while I was trying to replicate the bug, in rare instances it worked as expected but in most cases it failed.

Expected Behavior: Git repository is initialised and main branch (or whatever default branch is created) be chosen and available. Actual Behavior: No branch is selected.

Git Panel Images:

Image Image

Zed Version and System Specs

Zed: v0.185.12 (Zed) OS: macOS 15.4.1 Memory: 8 GiB Architecture: aarch64

tashi21 avatar May 08 '25 08:05 tashi21

Have the problem too. Repository initialized in terminal also show "no branch". (The right one)

However, when i push it to github and then clone it in another folder, it shows the branches (The left one).

Image

I was using Zed Dev 0.186.0, but I have the problem since the git panel was published.

yuanzui-cf avatar May 08 '25 14:05 yuanzui-cf

Is it still happening on latest release for anyone? I'm not able to reproduce this.

smitbarmase avatar Jun 17 '25 16:06 smitbarmase

I am updating via Flatpak on my linux machines.

These repos are already initialized and are being restored on Zed's startup.

I had moved back to Zed v0.189.5 when I first encountered the issue after upgrading to 0.190.4 (which was the next Flatpak release). I never encountered the issue under v0.189.5 as shown below.

I updated to v0.191.5 just now, and I can confirm it's still listing (no branch) on my machines. However, out of curiosity I loaded up v0.191.5 on an old MacBook Pro to discover that the git panel can determine the branches properly.

Photos are from my desktop, but my FW16 demonstrates the same behaviour.

Image

Image

Image

Zed Version and System Specs

-- Desktop Zed: v0.191.5 OS: Manjaro KDE Graphics Platform: Wayland Memory: 64 GB Architecture: x86_64

-- Laptop (FW16 7840HS) Zed: v0.191.5 OS: Manjaro KDE Graphics Platform: Wayland Memory: 32 GB Architecture: x86_64

[Not Affected] -- Laptop (MacBook Pro 13", Early 2015) Zed: v0.191.5 OS: macOS 12.7.6 Memory: 8 GB Architecture: x86_64

Cutieguwu avatar Jun 18 '25 23:06 Cutieguwu

The branch issue on my systems appears to have gone away on or by v0.200.5? Still no problem on v0.201.8.

Cutieguwu avatar Aug 31 '25 13:08 Cutieguwu

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 11:11 github-actions[bot]