Yes, it is safe to rename the folder containing a Git repository.
In your repository, browse to the file you want to rename. In the upper right corner of the file view, click to open the file editor. In the filename field, change the name of the file to the new filename you want. You can also update the contents of your file at the same time.
Actually, there is a way to rename a folder using web interface.
See https://github.com/blog/1436-moving-and-renaming-files-on-github
There is no way to do this in the GitHub web application. I believe to only way to do this is in the command line using git mv <old name> <new name>
or by using a Git client(like SourceTree).
You can! Just press edit as per @committedandroider's original post and then hit backspace with your cursor at the start of the filename. It will let you then edit the folder. When done hit forward slash to then edit the filename again.
I had an issue with github missing out on some case sensitive changes to folders. I needed to keep migration history so an example of how I changed "basicApp" folder in github to "basicapp"
$ git ls-files
$ git mv basicApp basicapp_temp
$ git add .
$ git commit -am "temporary change"
$ git push origin master
$ git mv basicapp_temp basicapp
$ git add .
$ git commit -am "change to desired name"
$ git push origin master
PS: git ls-files
will show you how github sees your folder name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With