Github README.md和readme.md-如何删除一个? [英] Github README.md and readme.md - how to delete one?

查看:148
本文介绍了Github README.md和readme.md-如何删除一个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以某种方式,我最终在github上拥有了README.md和readme.md.现在这两个相互影响,所以我的GitHub.app变得完全混乱. Github网站没有任何文件删除功能.

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?

推荐答案

github没有删除链接或按钮的原因是因为简单的删除"违反了源代码控制版本系统的性质.删除文件的方法是在本地删除文件,通常是使用终端窗口和使用git rm的命令行,将所做的更改(始终带有消息)提交,然后将其推送"到存储库中.如果文件在本地存在,但从未git add ed到git,则只能rm filename该文件-但警告,在命令行中通常没有rm可以确认"!
诚然,github可能已经考虑将所有内容打包"到一个删除页面链接中,给出原因的文字描述可以做到这一点,但这将是太多的黑魔法",并且会误导用户学习git以及如何使用github.

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 added 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.

如果要使用gui选项,可以使用很多git gui工具.在Mac上,gitx,git-tower和source-tree都是有帮助的工具.在
处也有基本的mac-github工具 http://mac.github.com/

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/

命令行路由显示在ThiefMaster的答案中

The command line route is shown in the answer by ThiefMaster

有关整个git进程以及各种命令和概念的更多信息,也可以在以下网址找到:

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?

这篇关于Github README.md和readme.md-如何删除一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆