Rename file with Git

前端 未结 6 1756
忘了有多久
忘了有多久 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:41

    I had a similar problem going through a tutorial.

    # git mv README README.markdown
    

    fatal: bad source, source=README, destination=README.markdown

    I included the filetype in the source file:

    # git mv README.rdoc README.markdown
    

    and it worked perfectly. Don't forget to commit the changes with i.e.:

    # git commit -a -m "Improved the README"
    

    Sometimes it is simple little things like that, that piss us off. LOL

提交回复
热议问题