[英]Git Push To New Repo Pushing Wrong Content
I tried creating a new repo on Bitbucket and pushing all of my code to it, but for some reason it is pushing another folder's contents to the repo? 我尝试在Bitbucket上创建一个新的存储库并将所有代码推送到该存储库,但是由于某种原因,它会将另一个文件夹的内容推送到该存储库? I used git status
and saw that there were many other files that were untracked yet completely irrelevant. 我使用了git status
,发现还有许多其他文件未跟踪但完全不相关。
Things that I done so far - 我到目前为止所做的事情-
git push -u origin --all
我git push -u origin --all
If I use the command ls
in my directory, I see that only the files I need are there. 如果我在目录中使用命令ls
,则会看到只有我需要的文件在那里。
原来我没有在该文件夹中初始化我的git存储库...。我使用git init
并成功了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.