Skip to content

Repository seems empty after pushing two branches #4919

Closed
@lfuerderer

Description

@lfuerderer

Description

When I create a new, empty repository in the web view and push two branches at the same time using one git push command, the repository still appears empty in the web view.

Steps to reproduce

  1. Create a new repository with the web browser. Leave the checkbox "Initialize Repository" empty.

  2. Clone the repository and create a commit.

     lukas@laptop:~$ git clone https://try.gitea.io/LukasFuerderer/Test.git
     Klone nach 'Test' ...
     Username for 'https://try.gitea.io': LukasFuerderer
     Password for 'https://[email protected]': 
     warning: Sie scheinen ein leeres Repository geklont zu haben.
     Prüfe Konnektivität ... Fertig.
     lukas@laptop:~$ cd Test
     lukas@laptop:~/Test$ touch dummy
     lukas@laptop:~/Test$ git add dummy
     lukas@laptop:~/Test$ git commit -m "Create dummy file"
     [master (Basis-Commit) 518f855] Create dummy file
      1 file changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 dummy
     lukas@laptop:~/Test$
    
  3. Create a second branch.

     lukas@laptop:~/Test$ git branch branch2
     lukas@laptop:~/Test$
    
  4. Push both branches using only one push command.

     lukas@laptop:~/Test$ git push origin master branch2
     Username for 'https://try.gitea.io': LukasFuerderer
     Password for 'https://[email protected]': 
     Zähle Objekte: 3, Fertig.
     Schreibe Objekte: 100% (3/3), 222 bytes | 0 bytes/s, Fertig.
     Total 3 (delta 0), reused 0 (delta 0)
     To https://try.gitea.io/LukasFuerderer/Test.git
      * [new branch]      master -> master
      * [new branch]      branch2 -> branch2
     lukas@laptop:~/Test$
    

Both branches are now pushed to the git repository in the background. If I clone the repository to a new location, they are visible.

But the web view still shows an empty repository. I can see the "Quick Guide" giving instructions how to create the first commit.

Screenshots

Creating the repository:
create-repo

After pushing both branches:
after-push

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions