无法使用sourcetree推送子树 [英] Can't push subtree using sourcetree

查看:435
本文介绍了无法使用sourcetree推送子树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找使用git subtree来使用我在我的项目回购中拥有的框架回购。这应该看起来像这样:


  • 项目

    • 有些东西

    • 有些东西

    • 框架




使用Windows的Sourcetree应用程序我做了以下工作:
$ b


  • 克隆项目

  • 在名为framework的文件夹中添加Subtree框架

  • 在框架中添加test.txt


我是这样的:




  • 项目

    • 一些东西

    • 有些东西

    • 框架

      • test.txt
      / li>



然后Sourcetree告诉我test.txt没有被提交,因此我添加它和提交它。



我可能会使用它错误,但我无法找到一种方法来确保test.txt实际上被添加到框架回购,而不是项目/框架,因为它似乎是。



如果我推这个我得到正确的文件在pr oject / framework / test.txt的预期,但框架回购仍然是空的(它没有收到我所做的更改)

我以为我不得不手动推子树将这些更改提交到框架回购,但它似乎循环不停地没有给我任何错误



我让它运行超过10分钟,但没有得到任何结果。任何帮助将不胜感激。



感谢您的宝贵时间。

解决方案

是的,你必须用你正在使用的东西将子树推送到远程。这就是整个子模块/子树方法的一般工作原理 - 您对主回购库进行了更改,但是您必须手动将这些更改提交给子树的远程设备。



我们设计了子树支持,以便您可以右键单击并使用我们存储的元数据推送到选定的子树。我还没有任何关于错误的报告,但那绝对看起来像一个。你可以通过jira.atlassian.com报告它,包括尽可能详细的信息,那里处理得更好,然后我会看看它。



干杯

p>

I'm looking to use git subtree to use a framework repo that I own in my project repo. This should look like this:

  • project
    • Some stuff
    • Some stuff
    • framework

Using Sourcetree app for windows I made the following:

  • Clone project
  • Add Subtree framework in a folder named framework
  • Add test.txt in framework

That leads me to something like this:

  • project
    • Some stuff
    • Some stuff
    • framework
      • test.txt

Sourcetree then tells me that test.txt is not staged for commit so I add it and commit it.

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.

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)

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

I let this run for more than 10 minutes but didn't get any result. 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.

Cheers

这篇关于无法使用sourcetree推送子树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆