Note that there are some explanatory texts on larger screens.

plurals
  1. POGit submodule update error
    primarykey
    data
    text
    <p>I'm starting to git right now, and running some tests to learn it better, but a got stucked on an error...</p> <p>I've started a git repository of a framework I'm developing which is used on a lot projects I'm working on, to update these projects easily.</p> <p>To test, I've started a new project and added the framework as a submodule. I've cloned the project on a new folder, executed the following commands <code>git submodule init; git submodule update</code> and the submodule was cloned into it's directory perfectly.</p> <p>After that, I've made some modifications to the source accordingly to the project needs and committed the modifications made on the source and pushed to the server. Everything went fine.</p> <p>On the another folder which I've cloned, I've pulled the modifications and everything seems to be ok.</p> <pre><code>DennyMac:app DennyLoko$ git commit -a -m "Teste" [master 68fee42] Teste 1 files changed, 1 insertions(+), 0 deletions(-) DennyMac:app DennyLoko$ cd .. DennyMac:vesti DennyLoko$ git add app DennyMac:vesti DennyLoko$ git commit -m "Teste" [master 3a2b13d] Teste 1 files changed, 1 insertions(+), 1 deletions(-) DennyMac:vesti DennyLoko$ git push Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 243 bytes, done. Total 2 (delta 1), reused 0 (delta 0) To git@git.xxxxxxxxxx.com:vesti.git 33fc470..3a2b13d master -&gt; master </code></pre> <p>But when I've checked the source of the modified file, nothing have changed. Running <code>git submodule update</code> it gives the following error:</p> <pre><code>DennyMac:testelol DennyLoko$ git submodule update fatal: reference is not a tree: 68fee423f5dba537956fec51dcab0901856ad4e6 Unable to checkout '68fee423f5dba537956fec51dcab0901856ad4e6' in submodule path 'app' </code></pre> <p>What do I have to do to fix this? I'm doing the best thing using a submodule or exists a better approach to that?</p> <p>Thank you guys!</p> <p>EDIT::</p> <p>Let's give more details...</p> <p>I've created the framework project on Assembla and sent the initial structure by the following commands:</p> <pre><code>git init git add . git commit -a -m "Estrutura inicial enviada" git remote add origin git@git.assembla.com:off.git git push origin master </code></pre> <p>After that, I've created the directory for the new project:</p> <pre><code>mkdir vesti cd vesti mkdir documentacao mkdir node_app git init git add . git submodule init git submodule add git@git.assembla.com:off.git app git commit -a -m "Teste" git remote add origin git@git.assembla.com:vesti.git git push origin master </code></pre> <p>After, I've created a new directory <code>mkdir testelol</code> and cloned <code>vesti</code> (<code>git clone git@git.assembla.com:vesti.git</code>) into this directory and executed the following commands:</p> <pre><code>git submodule init git submodule update </code></pre> <p>Which run successful and automatically cloned the git@git.assembla.com:off.git inside the app directory. Backing to <code>vesti</code> dir (<code>cd ../vesti</code>), I've done the following:</p> <ul> <li>Edited a file inside the <code>app</code> submodule (<code>echo "teste" &gt;&gt; app/application/Main_Class.php</code>)</li> <li>Changed to <code>app</code> dir (<code>cd app</code>)</li> <li>Committed the modification (<code>git commit -a -m "Teste"</code> returned <code>[master 68fee42] Teste 1 files changed, 1 insertions(+), 0 deletions(-)</code>)</li> <li>Backed to the root dir of the repo (<code>cd ..</code>)</li> <li>Added the <code>app</code> modifications (<code>git add app</code>)</li> <li>Committed (<code>git commit -m "Teste"</code> returned <code>[master 3a2b13d] Teste 1 files changed, 1 insertions(+), 1 deletions(-)</code>)</li> <li>And pushed the modifications (<code>git push</code>) </li> </ul> <p>.</p> <pre><code>DennyMac:vesti DennyLoko$ git push Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 243 bytes, done. Total 2 (delta 1), reused 0 (delta 0) To git@git.assembla.com:vesti.git 33fc470..3a2b13d master -&gt; master </code></pre> <p>After doing that all, I've backed to the <code>testelol</code> dir and executed the command <code>git pull</code> which returned the success message:</p> <pre><code>DennyMac:testelol DennyLoko$ git pull remote: Counting objects: 3, done. remote: Compressing objects: 100% (2/2), done. remote: Total 2 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (2/2), done. From git@git.assembla.com:vesti.git 33fc470..3a2b13d master -&gt; origin/master Fetching submodule app Updating 33fc470..3a2b13d Fast-forward app | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) </code></pre> <p>After that I checked if the modification was made to the file <code>testelol/app/application/Main_Class.php</code> but wasn't been changed. To update I run the following commands:</p> <pre><code>DennyMac:testelol DennyLoko$ git submodule init DennyMac:testelol DennyLoko$ git submodule update fatal: reference is not a tree: 68fee423f5dba537956fec51dcab0901856ad4e6 Unable to checkout '68fee423f5dba537956fec51dcab0901856ad4e6' in submodule path 'app' </code></pre> <p>That's it.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload