How to rename or modify a folder on github

  When sorting out the process on github, there was a folder named inappropriately, and I wanted to go back and change it, but I didn't find the option to rename the folder on the web page. After some tossing, I did this:

1. First find the public key on the server: the public key is in the ~/.ssh directory, and copy the file ending with .pub.

2. On the github website, click Settings and add the public key to ssh.

 

3. After adding, copy your project address, switch to ssh mode when git clone

4. git clone the address to the server: git clone "XXXX"

5. The project directory appears on the server, use the command "git mv -f oldname newname" to modify the name of the folder

6. If you want to create a new folder, use this command: git add -u newfolder

7. Update the web version: git commit -m "changed the foldername"

8. git push: update on the server

When you open the web page again, the file name and folder name have been updated successfully! 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325149114&siteId=291194637