Github README.md and readme.md

Somehow I endup with having README.md and readme.md on github. Now these two influence each other so my GitHub.app gets completely confused. Github web site do not have any file delete function.

How to delete one of these files?


The reason that github doesn't have a delete link or button is because a simple 'delete' goes against the nature of a Source Control Version System. The way to remove a file is to remove it locally, usually with a terminal window and the command line with git rm , commit that change - always with a message - and then 'push' that delete to the repository. If the file is present locally but never git add ed to git you can just rm filename the file - but warning, there's no 'confirm' normally at the command line with rm !
Admittedly, github could have looked to 'package' that all up into a delete page link that, given a text description for reason, could do that but it would be too much 'black magic' and misleading to users learning git and how to use github.

If you want a gui option, there are a lots of git gui tools out there. As you are on a mac, gitx , git-tower and source-tree are all tools that may help. There is also the basic mac-github tool at
http://mac.github.com/

The command line route is shown in the answer by ThiefMaster

More info on the overall git process and what the various commands and concepts are can also be found at: git branch, fork, fetch, merge, rebase and clone, what are the differences?


只需删除其中一个文件并提交删除即可。

$ git rm readme.md
$ git commit
$ git push
链接地址: http://www.djcxy.com/p/7550.html

上一篇: 门控提交使用git分支

下一篇: Github README.md和readme.md