简体   繁体   English

无法使用sourcetree推送子树

[英]Can't push subtree using sourcetree

I'm looking to use git subtree to use a framework repo that I own in my project repo. 我希望使用git子树来使用我在项目仓库中拥有的框架仓库。 This should look like this: 这应该是这样的:

  • project 项目
    • Some stuff 有些东西
    • Some stuff 有些东西
    • framework 骨架

Using Sourcetree app for windows I made the following: 使用Sourcetree应用程序的Windows我做了以下:

  • Clone project 克隆项目
  • Add Subtree framework in a folder named framework 在名为framework的文件夹中添加Subtree框架
  • Add test.txt in framework 在框架中添加test.txt

That leads me to something like this: 这导致我这样的事情:

  • project 项目
    • Some stuff 有些东西
    • Some stuff 有些东西
    • framework 骨架
      • test.txt 的test.txt

Sourcetree then tells me that test.txt is not staged for commit so I add it and commit it. 然后Sourcetree告诉我test.txt没有为commit提交,所以我添加它并提交它。

I might be using it wrong but I couldn't find a way to make sure test.txt was actually added to the framework repo and not to project/framework as it seems to be. 我可能使用它错了,但我找不到一种方法来确保test.txt实际上被添加到框架repo而不是项目/框架,因为它似乎是。

If I push this I got the right files in project/framework/test.txt as expected but the framework repo remains empty (it didn't receive the change I made) 如果我按下这个,我按预期在project / framework / test.txt中得到了正确的文件,但是框架repo仍然是空的(它没有收到我做的更改)

I thought I had to manually push the subtree to commit these changes to framework repo but it seems to loop endlessly without giving me any error 我以为我必须手动推送子树将这些更改提交到框架repo但它似乎无休止地循环而不给我任何错误

I let this run for more than 10 minutes but didn't get any result. 我让它运行超过10分钟,但没有得到任何结果。 Any help would be very appreciated. 任何帮助将非常感激。

Thanks for your time. 谢谢你的时间。

Yes, you'd have to push the subtree to the remote using precisely what you were using. 是的,您必须使用您正在使用的内容将子树推送到遥控器。 This is how the whole submodule/subtree approach works in general - you commit changes to your main repo but you'd have to manually push those changes up to the remote for the subtree. 这就是整个子模块/子树方法的工作原理 - 您提交对主仓库的更改,但是您必须手动将这些更改推送到子树的远程。

We designed subtree support so you could just right click and push to the selected subtree using metadata that we store. 我们设计了子树支持,因此您只需右键单击并使用我们存储的元数据推送到所选子树。 I haven't had any reports of bugs, but that definitely looks like one. 我没有任何关于错误的报告,但这看起来肯定是一个。 Could you report it via jira.atlassian.com including as much detail as possible, it's better handled there and I'll take a look at it then. 你能通过jira.atlassian.com报告它,包括尽可能详细的信息,它在那里处理得更好,然后我会看看它。

Cheers 干杯

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

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