Rename file with Git

前端 未结 6 1847
忘了有多久
忘了有多久 2021-01-29 20:12

I\'m new to Git/Github and I needs some help. I would like to rename file from README to README.md. I have only one repo called \"change-z-index\".

1) I open and login l

6条回答
  •  梦谈多话
    2021-01-29 20:34

    As far as I can tell, GitHub does not provide shell access, so I'm curious about how you managed to log in in the first place.

    $ ssh -T git@github.com
    Hi username! You've successfully authenticated, but GitHub does not provide
    shell access.
    

    You have to clone your repository locally, make the change there, and push the change to GitHub.

    $ git clone git@github.com:username/reponame.git
    $ cd reponame
    $ git mv README README.md
    $ git commit -m "renamed"
    $ git push origin master
    

提交回复
热议问题