Rename file with Git

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

    Do a git status to find out if your file is actually in your index or the commit.

    It is easy as a beginner to misunderstand the index/staging area.

    I view it as a 'progress pinboard'. I therefore have to add the file to the pinboard before I can commit it (i.e. a copy of the complete pinboard), I have to update the pinboard when required, and I also have to deliberately remove files from it when I've finished with them - simply creating, editing or deleting a file doesn't affect the pinboard. It's like 'storyboarding'.

    Edit: As others noted, You should do the edits locally and then push the updated repo, rather than attempt to edit directly on github.

提交回复
热议问题