git从已删除的文件中推动旧提交
我一直在尝试推出一个全新的存储库和一个全新的分支机构。当我这样做时,它会从几周前推动文件和提交。这些文件已删除了一段时间。我的工作树绝对没有,我的源控件是空的。我不明白如何使这种行为停止,因为它一直在发生。我在网上搜索事物,我看不到其他有这个问题的人。有任何建议吗???
I keep trying to push a brand new repository and a brand new branch. When I do so, it pushes files and commits from weeks ago. These files were deleted a while ago. There's absolutely nothing in my working tree, my source control is empty. I'm not understanding how I can get this behavior to stop because it keeps happening. I search for things online, and I don't see anyone else that has this problem. Any suggestions???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
我知道我的错误。我需要首先做一个
git init
,然后git add。
然后推动 - 设定上游原始主人。然后,这仅将我要github的文件夹/项目推送。I recognize my error. I need to do a
git init
first, thengit add .
thengit commit -m "initial commit"
then do agit push --set-upstream origin master
. This then pushes only the folder/project I want to github.