简体   繁体   English

如何从我的存储库中的github文件中删除文件路径?

[英]How to remove file paths from github files in my repository?

I'm new to github. 我是github的新手。 I'm trying to host my project on github pages but my file was added as Desktop/app instead of directly pushing the actual project files(index.html, etc.) to the repository. 我试图将我的项目托管在github页面上,但是我的文件被添加为Desktop / app,而不是直接将实际的项目文件(index.html等)推送到存储库中。 It looks like this: 看起来像这样:

http://imgur.com/2Z7UMjR http://imgur.com/2Z7UMjR

I don't want the files to be in a desktop/app folder. 我不希望这些文件位于桌面/应用程序文件夹中。 Thanks. 谢谢。

It seems you have cloned your project at Desktop/app . 看来您已经在Desktop/app克隆了项目。 If you don't want this repo, you can to delete from your GitHub account. 如果您不想要此存储库,则可以从GitHub帐户中删除。 Check this Link Deleting Git Repo 检查此链接删除Git存储库

Try to make new one - 尝试制作新的-

Go to the folder where you want have stored your project, and clone the new repository: Create GitHub Repo 转到要存储项目的文件夹,然后克隆新的存储库: 创建GitHub Repo

$git clone https://github.com/user_name/repository_name.git
$git add --all
$git commit -m "Your commit msg"
$git push -u origin master

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM