Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new file from the web ui when the repo is created #4308

Closed
2 of 7 tasks
shuhaowu opened this issue Jun 25, 2018 · 14 comments
Closed
2 of 7 tasks

Create new file from the web ui when the repo is created #4308

shuhaowu opened this issue Jun 25, 2018 · 14 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality

Comments

@shuhaowu
Copy link

shuhaowu commented Jun 25, 2018

  • Gitea version (or commit ref): 1.4.2
  • Git version:
  • Operating system: Ubuntu
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

If a git repository is created without any files in it (without any branch/commit/etc), you cannot create a new file from the web ui.

Screenshots

@lunny
Copy link
Member

lunny commented Jun 25, 2018

I think your first requirement has been implemented.

@daviian
Copy link
Member

daviian commented Jun 25, 2018

@shuhaowu You can create a directory by specifying a full path when creating a new file. Git doesn't allow to check in an empty folder.

@lafriks lafriks added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Jun 25, 2018
@shuhaowu
Copy link
Author

Ah I see how it works. I think the second issue still stands so I'm going to change this issue to be that one exclusively.

@shuhaowu shuhaowu changed the title Create new directory directly from the web ui Create new file from the web ui when the repo is created Jun 25, 2018
@bjoe2k4
Copy link

bjoe2k4 commented Jul 7, 2018

Seeing the same issue. Create new file/Upload File button is only shown after a branch and initial commit has been created.

@lunny lunny added type/enhancement An improvement of existing functionality and removed type/question Issue needs no code to be fixed, only a description on how to fix it yourself. labels Jul 8, 2018
@stale
Copy link

stale bot commented Jan 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Jan 19, 2019
@zeripath
Copy link
Contributor

I think this is a reasonable thing to have - it should be possible to do.

@lunny lunny removed the issue/stale label Jan 20, 2019
@lunny
Copy link
Member

lunny commented Jan 20, 2019

Right!

@stale stale bot added the issue/stale label Mar 21, 2019
@go-gitea go-gitea deleted a comment from stale bot Mar 21, 2019
@stale stale bot removed the issue/stale label Mar 21, 2019
@techknowlogick techknowlogick added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Mar 21, 2019
@rrimc69
Copy link

rrimc69 commented Dec 20, 2019

+1 same issue. Created bare repo from scratch, in GUI, no initial file addition possible from the GUI in the bare repo after creation.

@aiso-net
Copy link

+1 same issue. Created bare repo from scratch, in GUI, no initial file addition possible from the GUI in the bare repo after creation.

@eksiscloud
Copy link

+1, same here.

Is there some real reasons why creating a new file to empty repo in GUI is impossible?

@carlheaton
Copy link

+1, same here.

Is there some real reasons why creating a new file to empty repo in GUI is impossible?

AFAIK git doesn't allow it / see empty directories, so the feature would require a file such as ".keep" creating.

@theAkito
Copy link

theAkito commented Apr 1, 2021

AFAIK git doesn't allow it / see empty directories, so the feature would require a file such as ".keep" creating.

How is a new file an empty directory? The root directory is already "indexed" in a way, since it's the root of the Git repository. Then, you can always add files to the repository.

@jolheiser
Copy link
Member

I'm going to lock this thread, as of right now we are simply waiting on a PR.

There is an older one open at #6918, and if anyone would like to take it over please contact @lunny (or message on said PR) to avoid toe stepping. 🙂

If you would like to make an alternative proposal, please open a new issue.
Thanks for the interest, everyone!

@go-gitea go-gitea locked and limited conversation to collaborators Apr 1, 2021
@lunny
Copy link
Member

lunny commented Apr 20, 2023

resolved by #24164

@lunny lunny closed this as completed Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests