I was able to locate a way in the GitHub Web Application to rename
a single file and did so with success.
I was also able to find a way to rename a whole repository and did that with success.
Does anyone know how to do this to a single directory without using command line? For reference, I am trying to change a directory named InterviewTesting(that contains src files, etc) to something else. I tried doing it the single file way.
but this didn't allow me to change the name of the directory(InterviewTesting), only the actual ffile name.
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
As a newer user to git, I took the following approach. From the command line, I was able to rename a folder by creating a new folder, copying the files to it, adding and commiting locally and pushing. These are my steps:
$mkdir newfolder
$cp oldfolder/* newfolder
$git add newfolder
$git commit -m 'start rename'
$git push #New Folder appears on Github
$git rm -r oldfolder
$git commit -m 'rename complete'
$git push #Old Folder disappears on Github
Probably a better way, but it worked for me.
If you have GitHub Desktop, change the names of the directories on your computer and then push the update from your desktop to your github account and it changes them there. :)
Hope it helps!
I changed the 'Untitlted Folder' name by going upward one directory where the untitled folder and other docs are listed.
Tick the little white box in front of the 'Untitled Folder', a 'rename' button will show up at the top. Then click and change the folder name into whatever kinky name you want.
See the 'Rename' button?