AW: git log on bare repository fails if the default branch is not called master

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Ursprüngliche Nachricht-----
> Von: Ian Molton <git-ian@xxxxxxxxxxxxxx>
> Gesendet: Freitag, 3. Juni 2022 16:22
> An: git@xxxxxxxxxxxxxxx
> Cc: Ian Molton <git-ian@xxxxxxxxxxxxxx>
> Betreff: BUG: git log on bare repository fails if the default branch is not called
> master
> 
> Hi,
> 
> Please CC me in replies, I'm not on the list.
> 
> I've noticed that git log assumes the default branch is master, even if it doesn't
> exist...
> 
> My latest repo has it set to "mainline" and all was well until I pushed it to a bare
> repo on my server.
> 
> Expectation:
> 
> If I run
> 
> git log
> 
> in the bare repo, it should log the default (or only!) branch.
> 
> Reality:
> 
> git log
> # fatal: your current branch 'master' does not have any commits yet

I bet the HEAD file in your bare repository points to refs/heads/master...


Stefan




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux