英文:
how to add 2 java projects to the same bit bucket repository
问题
我创建了一个新的Bitbucket仓库,以及一个新的Java项目,并将它们关联起来,现在我可以提交、推送以及执行所有这些操作。
现在我创建了第二个Hello World Java项目,当我尝试推送到同一个Bitbucket仓库时,我收到了"推送被拒绝"的消息。
一个Bitbucket仓库是否只能容纳一个Java项目?或者是怎样的情况?对于Git和Bitbucket我是个初学者,非常感谢任何帮助。
英文:
I created a new bit bucket Repo,and a new Java project and I linked them,now I can commit and push and do all those operations.
Now I created a second hello world Java project and when I try to push to the same bit bucket Repo,I get "push rejected".
Can one bit bucket Repo hold one Java project?Or how is it?Sorry I am a beginner to git and BitBucket,any help appreciated.
答案1
得分: 0
我不确定关于位桶,但一般的做法是一个存储库对应一个项目。考虑到这一点,你需要为每个项目创建不同的存储库,在你的情况下是两个。
参考这份 Git 文档:https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line
英文:
I am not sure about bit bucket but the general practice is one repository holds one project. With that in mind, you need a different repository for each project, two in your case.
See this doc for Git: https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论