Default Git Bridge cloning branch issues 5.x


(Chris Atwood) #1

Matrix version: 5.5.6.3

Hey all

I’ve just noticed an issue with the Git Bridge asset. I’ve recently switched over to main as our master branch.

However, when we try to clone an asset via HTTPS (I believe SSH would be the same), it returns fatal: not a git repository error. I know this is fixed in 6.8, but no mention of version 5.

This is because by default git clone will clone the master branch. And as master does not exist, this will throw a fatal.

Of course, once you’ve cloned a repo, then you change branch/commit/tag, but it’s impossible to clone a repo without a master branch.

The workaround for me is

  • Create a master branch off main
  • Clone
  • Set up the branch to main within Current Repository settings
  • Remove the master branch

Are the Product team aware of this issue in 5.x? and is there a more elegant workaround for this issue in 5.x?

Thanks all :slight_smile:

Chris
Cardiff University.


(Bart Banda) #2

Hi Chris, Sorry for the late reply on this one, but yes, we were aware of this issue on M5 and we got early reports that the workaround that you mentioned was OK for now until an upgrade could be made, given cloning a Git repo into bridge is a “once off” thing.