Git 如何将更改推送到嵌套子树?
我有4个项目叫Git 如何将更改推送到嵌套子树?,git,github,Git,Github,我有4个项目叫 数学 摄像机 CGOpenGL OpenGLSandbox Math是Camera的子树,Camera是CGOpenGL的子树,最后CGOpenGL是OpenGLSandbox 当我在OpenGLSandbox中工作时,我需要对数学进行一些更改。完成更改后,我执行了git commit-am“bla bla”和git push这是在顶级目录下执行的,即OpenGLSandbox 重要的是,我添加了三个遥控器 玛斯指向数学的报告 ropengl指向CGOpenGL的回购 OpenG
git commit-am“bla bla”
和git push
这是在顶级目录下执行的,即OpenGLSandbox
重要的是,我添加了三个遥控器
! [rejected] f60f3e788d6e8713a525cab0fe187f5f3b230b8e -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/user123/Math.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
fatal: refusing to merge unrelated histories
因此,我尝试使用git subtree pull--prefix=cgopengl/camera/math-rmath-master进行一次拉取,结果出现以下错误
! [rejected] f60f3e788d6e8713a525cab0fe187f5f3b230b8e -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/user123/Math.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
fatal: refusing to merge unrelated histories
b)如何推动OpenGLSandbox项目对数学所做的更改?我找不到克服这一点的办法。我在哪里犯了错误?