code icon indicating copy to clipboard operation
code copied to clipboard

Cannot open an empty Git repo in sidebar

Open jeremypw opened this issue 4 years ago • 0 comments

What Happened

  1. Create an empty Git repo by running git init in an empty folder
  2. In Code, try to open this folder in the sidebar
  3. Terminal warning: ** (io.elementary.code:36612): WARNING **: 14:21:14.202: MonitoredRepository.vala:186: An error occured while fetching the current git branch name: reference 'refs/heads/master' not found
  4. The folder is not opened

Expected Behavior

The folder opens with a dummy branch name such as "(empty)" or some other indication that it is an empty git repository. There is not much you can do with an empty repo at the moment but in the future options to add files, pull from another repo etc should be implemented.

Steps to Reproduce

Logs

Platform Information

elementary 6 daily

jeremypw avatar May 19 '21 13:05 jeremypw