Andrey01 wrote:How to rename or delete files/folders in GitHub repo?
Just for future reference, when you ask, be sure to make it clear to others that you are only familiar with using the GitHub web interface, and not git as a commandline tool.
This makes it easier to know how best to help you.
* This answer refers to making these changes, using the GitHub web interface.
Before doing anything related to making changes to your repo, you want to create a new
branch to perform these changes.
When you open the page to your repo, above your username and avatar you will see a box which says
Branch Master, click on this.
A drop down window will appear to show an empty field with blinking cursor, add a name for your new branch here. (for the purpose of this example I will call it
changes. you may choose any name you like)
This will switch you over to the newly created branch to perform any changes.
Once finished with all changes you will see an option to
compare and pull request, select this option.
Add a comment to your PR
After the PR is set you will be asked to merge. (if you have numerous changes, best to choose
squash & merge.
Accept this merge to your master repo and you will see a message that it is safe to delete the
changes branch.
Your changes are now merged into your master repo branch and ready to share.
WARNING renaming the repo means you will need to make this change throughout your mod/code.
To rename a repo, select the
settings option for the repo you wish to rename.
The next page will show your repo's name in a boxed field. You can rename the entire repo there.
To rename an individual file, when you open that file, select the
edit option (the small pencil icon to the right)
As a side note of caution: Sometimes, renaming a file can have an impact on other aspects of your mod/code. Be sure to check all naming associated with this file throughout your code.
The file's name will appear in a boxed field. You can rename the file there, then select
commit.
When the page refreshes, you should see your file with the new name.
To delete a file, simply select the
delete option (the trash can icon to the right of the edit icon.
Texture files can only be renamed by uploading them to your repo under a different name, and then delete the original one, that you wanted to rename (otherwise you will have 2 of the same textures, with different names)
To delete an entire folder using the GitHub web interface, unfortunately (as far as I know) you need to delete every file within that folder. Once all are deleted, you need to commit.
The refreshed page will show your repo, minus that folder.
There may be other ways using this method, but I do not know of them.
I hope that helps
If there is any part you were looking for which I did not address, let me know.